016-002-003
Abstract and Concrete Methods: Shape Class
Medium
Problem Description
Abstract and Concrete Methods: Shape Class
Learning Objective
Learn the difference between abstract method implementation and concrete methods.
Problem
Implement the describe method in Circle class that extends abstract class Shape.
Input
Line 1: Radius (integer)
Output
This is a shape.
This is a circle with radius [radius].
Test Cases
※ Output examples follow programming industry standards
Input:
5
Expected Output:
This is a shape. This is a circle with radius 5.
Input:
10
Expected Output:
This is a shape. This is a circle with radius 10.
❌ 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
