Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

e, and the oulput file Java Topics Java IO, while loops, if-else-if, methods, summing/averaging data The programming standards and guidelines as discussed in class Use

image text in transcribed

e, and the oulput file Java Topics Java IO, while loops, if-else-if, methods, summing/averaging data The programming standards and guidelines as discussed in class Use of leftPad and padString in the Toolkit class References Textbook-use the index for relevant topics Your code from Project 4 for VO Toolkit java 8 Specification Write a Java program that reads from one file and writes to a second file. The files are 5 amed according to the naming convention we have been following using your name, section number and project number The file. Read and process the input fle in one pass through of the file, as should be done in all programs unless specified otherwise All output should be to one fle. Each line ir the input file contains an integer followed by a name as shown below Use a String to program processes input lines until the end of 2 store the name, Do NOT use an array. Do NOT use global (non-local) variables except for the Toolkit. The main method should contain all the variables. Do NOT use a separate class except for the Toolkit Create a printed report that consists of a table with appropriate headings. The columns of the report contain the name, value, and then a message in that order. The message is "OUTSTANDING" if the value is 90 or more."Satisfactory-if the value is between 70 and 89 inclusive; "FAILING otherwise. Use iflelseif or a table-driven approach. Use methods to line up the columns of the report. Use the padString method to output the name (a string) to a specified width, and a leftPad method for the value. Use Toolkit for the leftPad and padString methods S00GB After all the data lines have been processed, print with messages the number of data lines processed, the number and real average of the values between 70 and 89 inclusive and the average of all grades. The average is formatted to one decimal place Follow the documentation guidelines. Methods must be used at least for the heading of the table and for the summary of the table Data to use in this order 70 Light Karen L 99 Fagan Bert Todd 60 73 Camden Warren 80 Mulicka AI B Antrim Forrest N Lee Phoebe 75 Bright Harry 92 Garris Ted 83 Benson Martyne 71 Llayd Jeanine D 100 51 60 Leslie Bennie A Brandt Leslie Schulman David Worthington Dan Hall Gus W 60 Prigeon Dale FR 96 Fitzgibbons Rusty Instead of typing in the above data lines, you can copy them from this project file to a Notepad (PC) or textEdit (Mac). Do not put the table heading in the input text file using file. Using the variable inputFile' below to represent the input file, you can input each pair af data values as follows while (inputFile-hasNext( radenurFe first row, reads 70 into variable grade name - name name trim(): irputFile.nextLine0l"f Reads Light Karen L into variable name N Trims leading and trailing spaces, leaving Light Karen L' in the variable mame Process the information Sample Report Layout Name Grade Message Light Karen L Fagan Bert Todd 70 Satisfactory 99 OUTSTANDING Page 2 of 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions