017-005-004
Class and Control: Grade Calculator
Easy
Problem Description
class and Control: Grade Calculator
In this problem, you will create a program that instantiates a GradeCalculator class, calls its methods to compute the average of three subject scores and determine a letter grade (A/B/C), and displays the full grade report to standard output.
Learning Objective: Control program flow with class instantiation and method calls
Create GradeCalculator class to calculate average from multiple subject scores and determine evaluation. Learn how to control program execution order by creating objects and calling methods.
Understanding with Concrete Examples
Example 1: High Score (A Grade)
Input:
90
85
88
Output:
Grade Report:
Math: 90points
English: 85points
Japanese: 88points
Average: 87points
Grade: A
```java
### Example 2: Medium Score (B Grade)
```java
Input:
70
65
68
Output:
Grade Report:
Math: 70points
English: 65points
Japanese: 68points
Average: 67points
Grade: B
```java
### Example 3: Boundary Value (Exactly 80)
```java
Input:
80
80
80
Output:
Grade Report:
Math: 80points
English: 80points
Japanese: 80points
Average: 80points
Grade: A
```java
## Input
Line 1: Math score (integer, 0-100)
Line 2: English score (integer, 0-100)
Line 3: Japanese score (integer, 0-100)
## Output
```java
Grade Report:
Math: [math]points
English: [english]points
Japanese: [japanese]points
Average: [average]points
Grade: [grade]
```java
Grade criteria:
- 80 or above: A
- 60 or above: B
- Below 60: C.
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up