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
-
77% of U.S. adults think that political correctness is a problem in America today. You randomly select six U.S. adults and ask them whether they think that political correctness is a problem in...
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
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...
-
Occasionally, wire drawing of steel will place within a sheath of a soft metal, such as copper lead. Why would this procedure be effective?
-
Clyde had worked for many years as the chief executive of Red Industries, Inc., and had been a major shareholder. Clyde and the company had a falling out, and Clyde was terminated. Clyde and Red...
-
Calculate \(\frac{124}{297}+\frac{3}{125}\).
-
At December 31, 2011, Schroeder Corporation had the following stock outstanding. 8% cumulative preferred stock, $100 par, 107,500 shares $10,750,000 Common stock, $5 par, 4,000,000 shares 20,000,000...
-
At January 1, year 3, Mars Industries, Inc., owed Second Public Bank $13 million under a 13% note due December 31, year 5. Interest was paid last on December 31, year 1. Mars was experiencing severe...
-
Compute for the equivalent units of production for materials in each of the following cases: Case A: In Dept. B, the addition of materials evenly throughout the process increases goods in process.
-
If you were to try to estimate the appropriate cost of capital for different divisions, what problems might you encounter?
-
In what circumstances might someone, other than the applicant, complete home loan application forms on behalf of an applicant?
-
A recipe for baked stuffed potatoes calls for 6 potatoes and yields 12 servings. If the yield percent for the potatoes is 81% and 1 potato weighs 5 ounces, how many pounds of potatoes will you need...
-
Are all partners in a partnership subject to self employment tax on its taxable income? Explain.
-
1. How did Martin Luther King, Jr., make the decision to go to jail 2. Why did King decide to write the letter? 3. What role did his wife, Coretta Scott King, play while King was in jail? 4. Why does...
-
1. On February 19, 2020, Trisha borrowed P50,000 from a community cooperative at 9% simple interest. The loan is payable on September 12, 2020. Compute the simple interest using the four methods. How...
-
The 2017 financial statements of the U.S. government are available at: https://www.fiscal.treasury.gov/fsreports/rpt/finrep/fr/fr_index.htm Use these to answer the following questions: a. Statement...
-
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.
-
You are presented with the following summarised information relating to Ward plc: 1. The taxation charge in the profit and loss account includes the following items: 2. During the year to 30 June...
-
You are presented with the following forecast information relating to Baker Limited for the nine months to 30 September 2007. Forecast profit and loss accounts (abridged) for the three quarters to 30...
-
The accountant of a private company has been able to get the use of a computer to produce the spreadsheets shown below but as yet the computer lacks a program to print out final accounts. The...
Study smarter with the SolutionInn App