So, 0, 10, 20, 30 are x-axis, and 0, 10000, 20000, 30000, 40000, 50000, 60000 are y-axis

import java.util.*;

import java.io.*;

/*

  • CSC142 Programming Assignment #4:

*

  • Print an ascii histogram of the values of the ‘distribution[]’ array (defined below)
  • to standard output.

*

  • You will use print and println methods to print this histogram to standard output, but
  • it will appear ‘sideways’.

*

  • The output should have a line to represent the x-axis, and labels on the x-axis
  • in 5 or 10 count increments.

*

  • Use the ‘*’ character to represent the magnitude of the values. You will want to look
  • at the initialization statement below, find the maximum value in ‘distribution[]’ and
  • scale your output to an optimal display size for the end user.

*

  • I will post an example of a properly scaled output for this data set, and how the histogram
  • should appear to the Resources block in WAMAP.

*

  • You may modify the main() method below (which does not work properly),
  • or write your own method(s) to complete the assignment.

*

  • You can begin with this file, but please remember to remove my comments and replace
  • them with your own. (including a header comment with name, date, assignment number,
  • a description of what the class does, etc.)

*

  • The array, ‘distribution[]’, has previously been computed from the Geiger counter data
  • log file 7_14_2019.txt, which is posted in the Resources Block if you want to look at it.

*

  • The number of counts per minute logged to this file ranges from 0-39 counts per minute,
  • for the entire 15 months logged in the file.
  • So ‘distribution[]’ is statically initialized below, with 40 elements, which cover the
  • range from 0 to 39 counts per minute.

*

  • The number of occurrences of each specific value of counts per minute in the log file is
  • stored in distribution[], at that particular array index in distribution[].

*

  • For example, during the 15 month period that is logged in the file, there were exactly
  • 8 times that a value of 2 counts per minute occurred. This is seen below in the
  • initialization statement for ‘distribution’: distribution[2] has the value 8.

*

*/

public class PrintDistribution {

// private static String infile = “7_14_2019.txt”; The original data file name,

// included here for documentation.

public static int[] distribution = {0,1,8,59,215,703,1848,3975,8077,13937,22195,31628,

41711,51099,57142,59959,59670,55756,48850,40931,32583,

24995,18217,12794,8623,5577,3601,2272,1259,764,464,246,

153,80,39,22,12,6,3,0};

public static final int MAX_COUNTS = distribution.length;

public static void main(String[] args){

for (int i = 0; i < MAX_COUNTS ; i++) {

if (i % 10 == 0) {

System.out.print(i);

System.out.println(“|”);

}

else {

if (i < 10) {

System.out.println(” |”);

}

else {

System.out.println(” |”);

}

}

}

}

}

Sample Solution

Sample solution

Dante Alighieri played a critical role in the literature world through his poem Divine Comedy that was written in the 14th century. The poem contains Inferno, Purgatorio, and Paradiso. The Inferno is a description of the nine circles of torment that are found on the earth. It depicts the realms of the people that have gone against the spiritual values and who, instead, have chosen bestial appetite, violence, or fraud and malice. The nine circles of hell are limbo, lust, gluttony, greed and wrath. Others are heresy, violence, fraud, and treachery. The purpose of this paper is to examine the Dante’s Inferno in the perspective of its portrayal of God’s image and the justification of hell. 

In this epic poem, God is portrayed as a super being guilty of multiple weaknesses including being egotistic, unjust, and hypocritical. Dante, in this poem, depicts God as being more human than divine by challenging God’s omnipotence. Additionally, the manner in which Dante describes Hell is in full contradiction to the morals of God as written in the Bible. When god arranges Hell to flatter Himself, He commits egotism, a sin that is common among human beings (Cheney, 2016). The weakness is depicted in Limbo and on the Gate of Hell where, for instance, God sends those who do not worship Him to Hell. This implies that failure to worship Him is a sin.

God is also depicted as lacking justice in His actions thus removing the godly image. The injustice is portrayed by the manner in which the sodomites and opportunists are treated. The opportunists are subjected to banner chasing in their lives after death followed by being stung by insects and maggots. They are known to having done neither good nor bad during their lifetimes and, therefore, justice could have demanded that they be granted a neutral punishment having lived a neutral life. The sodomites are also punished unfairly by God when Brunetto Lattini is condemned to hell despite being a good leader (Babor, T. F., McGovern, T., & Robaina, K. (2017). While he commited sodomy, God chooses to ignore all the other good deeds that Brunetto did.

Finally, God is also portrayed as being hypocritical in His actions, a sin that further diminishes His godliness and makes Him more human. A case in point is when God condemns the sin of egotism and goes ahead to commit it repeatedly. Proverbs 29:23 states that “arrogance will bring your downfall, but if you are humble, you will be respected.” When Slattery condemns Dante’s human state as being weak, doubtful, and limited, he is proving God’s hypocrisy because He is also human (Verdicchio, 2015). The actions of God in Hell as portrayed by Dante are inconsistent with the Biblical literature. Both Dante and God are prone to making mistakes, something common among human beings thus making God more human.

To wrap it up, Dante portrays God is more human since He commits the same sins that humans commit: egotism, hypocrisy, and injustice. Hell is justified as being a destination for victims of the mistakes committed by God. The Hell is presented as being a totally different place as compared to what is written about it in the Bible. As a result, reading through the text gives an image of God who is prone to the very mistakes common to humans thus ripping Him off His lofty status of divine and, instead, making Him a mere human. Whether or not Dante did it intentionally is subject to debate but one thing is clear in the poem: the misconstrued notion of God is revealed to future generations.

 

References

Babor, T. F., McGovern, T., & Robaina, K. (2017). Dante’s inferno: Seven deadly sins in scientific publishing and how to avoid them. Addiction Science: A Guide for the Perplexed, 267.

Cheney, L. D. G. (2016). Illustrations for Dante’s Inferno: A Comparative Study of Sandro Botticelli, Giovanni Stradano, and Federico Zuccaro. Cultural and Religious Studies4(8), 487.

Verdicchio, M. (2015). Irony and Desire in Dante’s” Inferno” 27. Italica, 285-297.

This question has been answered.

Get Answer