Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

some how I can't produce the right output for this code? Process Scores Write a static method called processScores that takes as a parameter a

some how I can't produce the right output for this code?

image text in transcribedimage text in transcribedimage text in transcribed
Process Scores Write a static method called processScores that takes as a parameter a Scanner containing a series of lines that represent student records. Each student record takes up two lines of input. The first line has the student's name and the second line has a series of plus and minus characters. Below is a sample input: Kane, Erica ++ Chandler, Adam +++ Martin, Jake +++++++ Dillon, Amanda +++++ The number of plus/minus characters will vary, but you may assume that at least one such character appears and that no other characters appear on the second line of each pair. For each student you should produce a line of output with the student's name followed by a colon followed by the percent of plus characters. For example, suppose the input above is stored in a Scanner called input and we make the following call: processScores(input); The following output should then be produced: Kane, Erica: 40.0% plus Chandler, Adam: 75.0% plus Martin, Jake: 100.0% plus Dillon, Amanda: 62.5% plus You do not need to round the percentages; you should output the exact value. You must exactly reproduce the format of this log.import java. util. *; import java. io. *; public class ProcessScores { public static void main(String args) throws FileNotFoundException { Scanner input1 = new Scanner (new File ("input1. txt") ) ; processScores (input1) ; Scanner input2 = new Scanner (new File ("input2. txt") ) ; processScores (input2) ; Scanner input3 = new Scanner (new File ("input3. txt") ) ; processScores (input3) ; / / TODO: Your Code Here -> Write a method / / called processScores for this

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_2

Step: 3

blur-text-image_3

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

Modern Dental Assisting

Authors: Doni Bird, Debbie Robinson

13th Edition

978-0323624855, 0323624855

Students also viewed these Programming questions

Question

can you help me with number 1? 10:04

Answered: 1 week ago