017-004-003
Interface Extension: Shape Drawing
Medium
Problem Description
Interface Extension: Shape Drawing
In this problem, you will create a program that implements an extended interface inheriting from a basic drawing interface, reads a shape name and color name, and displays the result in the specified format to standard output.
Learning Objective: Extend interface by inheriting from another interface
Extend basic drawing interface to add colored drawing functionality.
Input
Line 1: Shape name
Line 2: Color name
Output
Drawing: [shape]
Color: [color]
Example
Input:
Circle
Red
Output:
Drawing: Circle
Color: Red
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up