Evaluator Pattern: Unified Method
Problem Description
Evaluator Pattern: Unified method
In this problem, you will create a program that reads an evaluation type (normal/strict) and a score, calls the evaluate() method on one of two classes (GradeEvaluator or StrictEvaluator) each applying different criteria, and displays the evaluation result to standard output.
Learning Objective: Control program flow uniformly by multiple classes having the same method name
Create a grade evaluation system. Both GradeEvaluator and StrictEvaluator classes have an evaluate() method and perform evaluation with different criteria. Learn that the same method name enables the caller to evaluate in a unified way.
Input
Line 1: Evaluation type (integer, 1=normal/2=strict)
Line 2: Score (integer, 0-100)
Output
Evaluation Result:
Type: [type]
Score: [score]points
Result: [result]
```java
Evaluation criteria:
- Normal evaluation (type 1): 60 or above=Pass, below 60=Fail
- Strict evaluation (type 2): 80 or above=Pass, below 80=Fail
## Examples
### Example 1: Normal evaluation passing
Input:
```java
1
75
```java
Output:
```java
Evaluation Result:
Type: Normal
Score: 75points
Result: Pass
```java
### Example 2: Strict evaluation failing
Input:
```java
2
75
```java
Output:
```java
Evaluation Result:
Type: Strict
Score: 75points
Result: Fail
```java
### Example 3: Normal evaluation boundary
Input:
```java
1
60
```java
Output:
```java
Evaluation Result:
Type: Normal
Score: 60points
Result: Pass
Test Cases
※ Output examples follow programming industry standards
1 75
Evaluation Result: Type: Normal Score: 75points Result: Pass
2 75
Evaluation Result: Type: Strict Score: 75points Result: Fail
1 60
Evaluation Result: Type: Normal Score: 60points Result: Pass
2 80
Evaluation Result: Type: Strict Score: 80points Result: Pass
Your Solution
You have 6 free executions remaining
