Trusted by Students Everywhere
Why Choose Us?
0% AI Guarantee

Human-written only.

24/7 Support

Anytime, anywhere.

Plagiarism Free

100% Original.

Expert Tutors

Masters & PhDs.

100% Confidential

Your privacy matters.

On-Time Delivery

Never miss a deadline.

JAVA SIX-15 points READ Gaddis chapter 7: [2 exercises] Write a program to keep exam scores for 5 students using the Array

Computer Science Nov 18, 2021

JAVA SIX-15 points READ Gaddis chapter 7: [2 exercises]

  1. Write a program to keep exam scores for 5 students using the Array. The program should allow the user to enter the scores and save them for each of the 5 students.  It should have a method to find the highest score for the exam (p428).  It should have another method to curve all scores for the exam (p424) using the difference between 100 and the highest score. Ex: if the highest score is 96 then all 5 students get a 4-point curve.  The program should also have a method to display the scores and average for the exam (p428).

    Hints/Tips:
    • It took me about 25 minutes

Rubric:

    • Doesn’t create and use arrays -7.5 (no credit for this part of the assignment)
    • Doesn’t let user enter grades -2
    • Doesn’t calculate the highest score -2
    • Doesn’t correctly calculate the curve -1
    • Doesn’t adjust everyone’s grade -1
    • Doesn’t display scores -1
    • Doesn’t display exam average -1
  1. Write a program to keep up with your budget. There should be 4 ArrayList (p473) definitions
    • #1 - contains a String description of the income item
    • #2 - contains a double with the income amount, but must be saved as a String
    • #3 - contains a String description of the expense item
    • #4 - contains a double with the expense amount, but must be saved as a String

Ask the user how many income items and how many expense items they want to track.  Set up a loop to get the income items, and another to get the expense items. Once the data has been entered, display:

    • A detailed list of income items
    • A subtotal of the income items
    • A detailed list of expense items
    • A subtotal of the expense items
    • A grand total of the income less the expenses

Hints/Tips:

    • Because it’s an ArrayList, you can only store objects (such as a String), so the amounts must be stored as strings, then converted to doubles to print and accumulate
    • You need loops to request the data from the user and to print the results.
    • If you want to do math in System.out.print, put the equation in parenthesis.
    • You can right-justify and set the column width using %10s (p171)
    • It took me about 30 minutes

Rubric:

    • Doesn’t use ArrayList -7.5 (no credit for this part of the assignment)
    • Doesn’t load the number of items specified by the user -2
    • Doesn’t total the amounts -2
    • Doesn’t have a grand total -1
    • Doesn’t list the detail items with amounts -2
Archived Solution
Unlocked Solution

You have full access to this solution. To save a copy with all formatting and attachments, use the button below.

Already a member? Sign In
Important Note: This solution is from our archive and has been purchased by others. Submitting it as-is may trigger plagiarism detection. Use it for reference only.

For ready-to-submit work, please order a fresh solution below.

Or get 100% fresh solution
Get Custom Quote
Secure Payment