017-005-004

Class and Control: Grade Calculator

Easy

Problem Description

Class and Control: Grade Calculator

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.

Test Cases

※ Output examples follow programming industry standards

Input:
90
85
88
Expected Output:
Grade Report:
Math: 90points
English: 85points
Japanese: 88points
Average: 87points
Grade: A
Input:
70
65
68
Expected Output:
Grade Report:
Math: 70points
English: 65points
Japanese: 68points
Average: 67points
Grade: B
Input:
80
80
80
Expected Output:
Grade Report:
Math: 80points
English: 80points
Japanese: 80points
Average: 80points
Grade: A
Input:
50
55
59
Expected Output:
Grade Report:
Math: 50points
English: 55points
Japanese: 59points
Average: 54points
Grade: C
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// Write your code here

sc.close();
}
}
0 B / 5 MB

You have 9 free executions remaining