Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 5 1 5 p t s File Processing Write a static method called reportScore that takes as a parameter a Scanner containing informat ion

Question 5
15pts
File Processing
Write a static method called reportScore that takes as a parameter a Scanner containing informat ion about a student's performance and that prints a report for that student.
Students are given gold stars for tasks they solved articularly well and minuses for tasks where they performed poorly. The information for each student is presented as a series of count/type pairs where each count is a positive integer and each type is either "*" or "-".
These count/type pairs are followed by the student's name which is guaranteed to be a single w ord
composed entirely of alphabetic characters. Consider this report:
3**2-1** Erica
It indicates that Erica got 3 stars followed by 2 minuses followed by 1 star.
The overall score is computed by giving 1 plus point for each star and one minus point for each minus.
The method produces exactly one line of output reporting this score and the total number of task
5.
The table below includes several examples.
Scanner contents
\table[[3**2-1** Erica],[2-1**2-1-1
image text in transcribed

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

Data Science Project Ideas In Health Care Volume 1

Authors: Zemelak Goraga

1st Edition

B0CPX2RWPF, 979-8223791072

Students also viewed these Databases questions