014-004-001

protected Modifier: Account Class

Easy

Problem Description

protected Modifier: Account Class

Learning Objective: Access protected fields directly from child class

Create Account class representing bank accounts and SavingsAccount class inheriting from it. Learn that child class can directly access parent class protected fields.

Input

Line 1: Account number (string)
Line 2: Balance (integer)

Output

Account: [account number]
Balance: [balance]yen
Type: Savings
Interest: [balance*0.01]yen
```java

## Examples

### Example 1: Basic account
Input:
```java
ACC001
10000
```java
Output:
```java
Account: ACC001
Balance: 10000yen
Type: Savings
Interest: 100.0yen
```java

### Example 2: Different account
Input:
```java
ACC999
50000
```java
Output:
```java
Account: ACC999
Balance: 50000yen
Type: Savings
Interest: 500.0yen
```java

### Example 3: Boundary (minimum balance)
Input:
```java
A
1
```java
Output:
```java
Account: A
Balance: 1yen
Type: Savings
Interest: 0.01yen

Test Cases

※ Output examples follow programming industry standards

Input:
ACC001
10000
Expected Output:
Input:
ACC999
50000
Expected Output:
Input:
A
1
Expected Output:
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
Account.java🔒
SavingsAccount.java🔒
Solution.java🔒
3/6 ファイル0B
⚠️警告
  • No main method found

0 B / 5 MB

You have 9 free executions remaining