With your current Java knowledge, you have decided to write a program that will calculate a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
With your current Java knowledge, you have decided to write a program that will calculate a student's GPA for the current semester. The program should prompt the user to enter four values representing the number of A, B, C and Ds earned for the semester then calculate and display the GPA. When writing the program, consider the following: The program should prompt the user to enter four INTEGER values representing the number of grades earned for each letter grade. GPA is calculated by dividing the total points earned by the total number of credits attempted. All of the courses taken for the semester are 4 credits. To determine the calculations, A grades have a point value of 4, B grades a point value of 3, C grades a point value of 2 and D grades a point value of 1. Total Number of Credits Attempted = Sum of Number of Courses multiplied by the number of credits for each course. The total points earned is the sum of the credit hours multiplied by the point value for each letter grade. Use the Scanner class to accept the user input. The output should be displayed with 3 significant decimal places. Explicit casting and constant representation should be used where applicable. . Output should be displayed in full sentence. Save the code as GPAScanner.java Sample Program Execution: GPA Calculator Enter the number of A grades earned: 3 Enter the number of B grades earned: : 1 Enter the number of C grades earned: 0 Enter the number of D grades earned: : 2 Grade A Credit Hours Grade Points 12 48 B 4 12 C 0 0 D 8 8 Total 24 68 The GPA for attempting 24 credit hours and earned grades is 68/24 = 2.833 Part II. Modify the program above to accept the input using GUI window dialog boxes. Test your program with different input values. Save the program as GPAGUI.java Be sure to include the following in both files o Headers containing appropriate information Informative comments o Whitespace and indentation User prompts for entered data Aligned and labeled output With your current Java knowledge, you have decided to write a program that will calculate a student's GPA for the current semester. The program should prompt the user to enter four values representing the number of A, B, C and Ds earned for the semester then calculate and display the GPA. When writing the program, consider the following: The program should prompt the user to enter four INTEGER values representing the number of grades earned for each letter grade. GPA is calculated by dividing the total points earned by the total number of credits attempted. All of the courses taken for the semester are 4 credits. To determine the calculations, A grades have a point value of 4, B grades a point value of 3, C grades a point value of 2 and D grades a point value of 1. Total Number of Credits Attempted = Sum of Number of Courses multiplied by the number of credits for each course. The total points earned is the sum of the credit hours multiplied by the point value for each letter grade. Use the Scanner class to accept the user input. The output should be displayed with 3 significant decimal places. Explicit casting and constant representation should be used where applicable. . Output should be displayed in full sentence. Save the code as GPAScanner.java Sample Program Execution: GPA Calculator Enter the number of A grades earned: 3 Enter the number of B grades earned: : 1 Enter the number of C grades earned: 0 Enter the number of D grades earned: : 2 Grade A Credit Hours Grade Points 12 48 B 4 12 C 0 0 D 8 8 Total 24 68 The GPA for attempting 24 credit hours and earned grades is 68/24 = 2.833 Part II. Modify the program above to accept the input using GUI window dialog boxes. Test your program with different input values. Save the program as GPAGUI.java Be sure to include the following in both files o Headers containing appropriate information Informative comments o Whitespace and indentation User prompts for entered data Aligned and labeled output
Expert Answer:
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date:
Students also viewed these programming questions
-
"internet radios" for streaming audio, and personal video recorders and players. Describe design and evaluation processes that could be used by a start-up company to improve the usability of such...
-
Microkernel operating systems aim to address perceived modularity and reliability issues in traditional "monolithic" operating systems. (i) Describe the typical architecture of a microkernel...
-
Please answer the following e-commerce problem in at least 350 words (I encourage you to write more to fully respond to the prompt). This assignment will be graded. Electronic Commerce Problem: Erin...
-
With respect to the topics covered in this cha list and explain specifically two examples each w friction (a) Is desirable (b) Is not desirable.
-
A mixture having a volume of 10.00 mL and containing 0.1000 M Ag + and 0.100 0 M Hg 2 2+ was titrated with 0.1000 M KCN to precipitate Hg 2 (CN) 2 and AgCN. (a) Calculate pCN - at each of the...
-
Refer to the information from QS 21-18. Compute the variable overhead spending variance and the variable overhead efficiency variance and classify each as favorable or unfavorable. Data From QS 21-18...
-
An inexperienced accountant prepared this condensed income statement for McDowell Company, a retail firm that has been in business for a number of years. As an experienced, knowledgeable accountant,...
-
A 2 kg block is attached to a spring with a force constant of 400 N/m. The block is initially at rest and is compressed by 0.5 meters from its equilibrium position. When released, the block undergoes...
-
A bottle filling machine is designed so that when it is operating properly it fills bottles with a mean of 64 ounces and a standard deviation of 0.73 ounces. To test themachine to see if it is...
-
Which of the following is true of an Interface of a component? (a) It is required by a public Port of the component (b) It is realized by the component or its parent Class (c) It is realized by the...
-
Cowboy Company drilled a well to targeted depth, incurring costs of $700,000. Completion costs are estimated to be $200,000. The sale of oil from the well is estimated to generate net cash flows of...
-
Model elements within . are always private, but within they are public. (a) Parametric diagrams, Component diagrams (b) Package diagrams, Component diagrams (c) Component diagrams, Package diagrams...
-
Aggie Company obtained a lease on August 1, 2018. The lease contract specifies a three-year primary term. a. Drilling operations began on June 1, 2019, and continued until October 15, 2019, when the...
-
Which of the following cannot be represented within a frame of a composite structure diagram? (a) Profile diagram (b) Deployment diagram (c) Object diagram (d) Class diagram
-
At time t = 0, in your frame of reference Z, you measure the back of the spaceship to be at x = 0 and the front of the ship to be at x = l. Find an equation relating the length that you measure l to...
-
Transform the while loop from the previous exercise into an equivalent for loop (make sure it produces the same output).
-
Many apps you use daily have built-in spell checkers. In this project, youre asked to develop your own spell-checker utility. We make suggestions to help get you started. You should then consider...
-
Write an application that reads a list of integers and stores them in a linked list. Write a method that identifies and prints the position at which the list is no longer sorted in an increasing...
-
Research the Game of Snake online and develop an app that allows a user to play the game.
-
Lana Priest set up a home sewing business on 1 July 2019. Usually, Lana collects $20 per hour for sewing on the completion of each days work and pays for the maintenance of her machine with cash....
-
Craigs Car Detailing Service had the following accounts and account balances in the adjusted trial balance columns of its worksheet for the year ended 30 June 2019. Required (a) Record the required...
-
The accounts below are taken from the ledger of Bartel Music Consulting on 30 June 2019, the end of the current financial year. Required (a) Record the closing entries that affected the accounts. (b)...
Study smarter with the SolutionInn App