016-003-005
Inheritance Basics: super Call in Card Inheritance
Easy
Problem Description
Inheritance Basics: super Call in Card Inheritance
Learning Objective: Understand class inheritance (extends) and superclass reference (super), learn how to reuse parent class functionality
Create basic Card class and GoldCard class that inherits from it.
Test Cases
※ Output examples follow programming industry standards
Input:
CARD001 1000 100
Expected Output:
Input:
GOLD999 5000 500
Expected Output:
Input:
C 0 0
Expected Output:
❌ Some tests failed
Your Solution
Current Mode:● My Code
99
1
2
3
4
5
6
7
8
9
10
›
⌄
⌄
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
