Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Programming: I'm trying to write a program where Im taking in a file and counting and outputing the number of correct solutions and the

Java Programming:

I'm trying to write a program where Im taking in a file and counting and outputing the number of correct solutions and the total minutes it took for the right problem. If the problem was right and there was an attempt, add 20 minutes for each attempt made plus the minutes it took for the right answer.

image text in transcribed

Our new contest submission system keeps a chronological log of all submissions made by each team during the contest. With each entry, it records the number of minutes into the competition at which the submission was received, the letter that identifies the relevant contest problem, and the result of testing the submission (designated for the sake of this problem simply as right or wrong). As an example, the following is a hypothetical log for a particular team 3 E right 10 A wrong 30 C wrong 50 B Wrong 100 A wrong 200 A right 250 C Wrong 300 D right The rank of a team relative to others is determined by a primary and secondary scoring measure calculated from the submission data. The primary measure is the number of problems that were solved. The secondary measure is based on a combination of time and penalties. Specifically, a team's time score is equal to the sum of those submission times that resulted in right answers, plus a 20-minute penalty for each wrong submission of a problem that is ultimately solved. If no problems are solved, the time measure is 0 In the above example, we see that this team successfully completed three problems: E on their first attempt ( 3 minutes into the contest); A on their third attempt at that problem (200 minutes into the contest); and d on their first attempt at that problem (300 minutes into the contest). This team's time score (including penalties) is 543. This is computed to include 3 minutes for solving e, 200 minutes for solving a with an additional 40 penalty minutes for two earlier mistakes on that problem, and finally 300 minutes for solving d. Note that the team also attempted problems B and c, but were never successful in solving those problems, and thus received no penaltie:s for those attempts

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

Essential Data Protection For Estate Agencies In Singapore 2024

Authors: Yang Yen Thaw Yt

1st Edition

B0CQK79WD3, 979-8872095392

More Books

Students also viewed these Databases questions

Question

In what activities do you participate?

Answered: 1 week ago