educational course/tutorialoutlet.com educational course/tutorialoutlet.com | Page 50
message to the TicketArraysImpl object ). Loop until the method returns a number other than 0 , indicating the file was read ( andthat the ticket data array now has ticket data stored in it ). v Read the filename for the input data file from the user . v In a loop ( inner loop ):§ Create a new object of the TickeArraysImpl class .§ Define a main method to : o Display a description of what the program will do to the user . o In a loop ( outer loop ):· Define a static method to display a ticket summary , using the previously defined static methods tocalculate the low , high , and average fines . o Parameters : the fines array and count of fines in the arrayo Ticket summary will be displayed as shown in the sample output on the next page , with allfigures will be right-aligned on the decimal point . BBB222 87.50XYZ123 66.25A1B2C3 215.10Total 368.85 © Regis University , All Rights ReservedUnauthorized distribution ( including uploading to any non-Regis Internet website ) violates copyright law · Define three static methods to : o Determine and return the lowest fine amounto Calculate and return the average fine amounto Determine and return the highest fine amountEach will have the fines array and count of fines in the array as parameters .· Display a message that explains which file could not be openedand that a fines report will not be generated . 4 . Define a third ( main ) class named : TicketAnalysisWithin the TicketAnalysis class :§ The last line of the output file will contain the total of all fines collected , rightalignedon the decimal point , with the fines listed above it . Sample output fileo Catch any FileIOException exceptions . When caught :§ nt . & display program description // Loop :// code to instantiate TicketArrayImpl object // Loop :// code to read filename and try to read data from the file // code to create fines array // code to call other methods } // three methods to calculate the fines average , low , and high go here ( includes comments with parameter and return tags ) // method to display a ticket summary ( with comments and parameter tags ) --------------------------------------------------------------------------------------- CS 331 , Spring 2017 Assignment # 2
FOR MORE CLASSES VISIT
message to the TicketArraysImpl object ). Loop until the method returns a number other than 0 , indicating the file was read ( andthat the ticket data array now has ticket data stored in it ). v Read the filename for the input data file from the user . v In a loop ( inner loop ):§ Create a new object of the TickeArraysImpl class .§ Define a main method to : o Display a description of what the program will do to the user . o In a loop ( outer loop ):· Define a static method to display a ticket summary , using the previously defined static methods tocalculate the low , high , and average fines . o Parameters : the fines array and count of fines in the arrayo Ticket summary will be displayed as shown in the sample output on the next page , with allfigures will be right-aligned on the decimal point . BBB222 87.50XYZ123 66.25A1B2C3 215.10Total 368.85 © Regis University , All Rights ReservedUnauthorized distribution ( including uploading to any non-Regis Internet website ) violates copyright law · Define three static methods to : o Determine and return the lowest fine amounto Calculate and return the average fine amounto Determine and return the highest fine amountEach will have the fines array and count of fines in the array as parameters .· Display a message that explains which file could not be openedand that a fines report will not be generated . 4 . Define a third ( main ) class named : TicketAnalysisWithin the TicketAnalysis class :§ The last line of the output file will contain the total of all fines collected , rightalignedon the decimal point , with the fines listed above it . Sample output fileo Catch any FileIOException exceptions . When caught :§ nt . & display program description // Loop :// code to instantiate TicketArrayImpl object // Loop :// code to read filename and try to read data from the file // code to create fines array // code to call other methods } // three methods to calculate the fines average , low , and high go here ( includes comments with parameter and return tags ) // method to display a ticket summary ( with comments and parameter tags ) --------------------------------------------------------------------------------------- CS 331 , Spring 2017 Assignment # 2
FOR MORE CLASSES VISIT