018-002-001
Inheritance Basics: Point Card Extension
Easy
Problem Description
inheritance Basics: Point Card Extension
In this problem, you will create a program that implements a GoldCard class inheriting from PointCard class and displays gold card member point information to standard output.
Learning Objective: Extend classes with inheritance and reuse code
Create GoldCard class inheriting from PointCard class. Learn inheritance basics: inherit parent class functionality while adding unique child class features.
Test Cases
※ Output examples follow programming industry standards
Normal case
Input:
{"cardType":"PointCard","basicPoints":1000}Expected Output:
Holder: Tanaka Points: 1000 === Gold Card === Holder: Suzuki Basic Points: 1000 Bonus Rate: 20.0% Total Points: 1200
Normal case
Input:
{"cardType":"GoldCard","basicPoints":1000}Expected Output:
Holder: Tanaka Points: 1000 === Gold Card === Holder: Suzuki Basic Points: 1000 Bonus Rate: 20.0% Total Points: 1200
Your Solution
Current Mode:● My Code
PointCard.java🔒
GoldCard.java🔒
Main.java🔒
3/6 ファイル76B
⚠️警告
- No main method found
9
1
2
›
⌄
class PointCard {
}
0 B / 5 MB
You have 10 free executions remaining
