017-004-004

Interface Extension: Adding Functionality Through Inheritance

Medium

Problem Description

Interface Extension: Adding Functionality Through Inheritance

Learning Objective: Understand that interfaces can extend other interfaces

Overview

Create a Colorable interface that extends Drawable interface, and create a class that implements both methods.

Specifications

  • Drawable interface: draw() method
  • Colorable interface: extends Drawable, adds setColor(String) method
  • Circle class: implements Colorable

Output Format

Color set to: Red
Drawing Circle

Test Cases

※ Output examples follow programming industry standards

Input:
Expected Output:
Color set to: Red
Drawing Circle
❌ Some tests failed
❌ エラー発生

Your Solution

Current Mode: My Code
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