Create a class that represents the grade distribution for a given course. In this class you should write methods to perform the following tasks: Read the number of each of the letter grades A, B, C D and F Set the number of letter grades A, B, C, D and F Return the total number of grades Return the percentage of each letter grade as a whole number between 0 and 100 inclusive Draw a bar graph of the grade distribution The graph should have five bars, one per grade. Each bar can be a horizontal row of asterisks, such that the number of asterisks in a row is proportionate to the percentage of grades in each category. For example, let on asterisk represent 2%, so 50 asterisks correspond to 100%. Mark the horizontal axis at 10% increments from 0 to 100% and label each line with a letter grade. For example, if the grades are entered as 1A, 4B's, 6C's, 2D's and 1 F, the total number of grades is 14, the percentage of As os 7, the percentage of Bs is 29, the percentage of Cs is 43, the percentage of Ds is 14, and the percentage of Fs is 7. The A row would contain 4 asterisks (7 percent of 50 rounded to the nearest  integer), the ab roe 14, the C row 21, the D row 7, and the F row 4. The graph would look like this: 0 10 20 30 40 50 60 70 80 90 100% |     |    |     |     |    |     |    |     |     |      | ************************************************** **** A ************** B ******************** C ****** D ****  F Also, the program must include two classes- GradesGraph and GradesGraphDemo. GradeGraphDemo(one method) -main method only GradeGraph- include at least 4 methods

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Create a class that represents the grade distribution for a given course. In this class you should write methods to perform the following tasks:

Read the number of each of the letter grades A, B, C D and F

Set the number of letter grades A, B, C, D and F

Return the total number of grades

Return the percentage of each letter grade as a whole number between 0 and 100 inclusive

Draw a bar graph of the grade distribution
The graph should have five bars, one per grade. Each bar can be a horizontal row of asterisks, such that the number of asterisks in a row is proportionate to the percentage of grades in each category. For example, let on asterisk represent 2%, so 50 asterisks correspond to 100%. Mark the horizontal axis at 10% increments from 0 to 100% and label each line with a letter grade.
For example, if the grades are entered as 1A, 4B's, 6C's, 2D's and 1 F, the total number of grades is 14, the percentage of As os 7, the percentage of Bs is 29, the percentage of Cs is 43, the percentage of Ds is 14, and the percentage of Fs is 7. The A row would contain 4 asterisks (7 percent of 50 rounded to the nearest  integer), the ab roe 14, the C row 21, the D row 7, and the F row 4. The graph would look like this:

0 10 20 30 40 50 60 70 80 90 100%

|     |    |     |     |    |     |    |     |     |      |

**************************************************

**** A

************** B

******************** C

****** D

****  F

Also, the program must include two classes- GradesGraph and GradesGraphDemo.

  • GradeGraphDemo(one method) -main method only
  • GradeGraph- include at least 4 methods
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education