Question: Question Goal: Learn how to use inheritance with interfaces Assignment: Imagine that you are helping a musical instrument manufacturer to classify it's instrument portfolio. The
Question
Goal: Learn how to use inheritance with interfaces
Assignment: Imagine that you are helping a musical instrument manufacturer to classify it's instrument portfolio. The company sells many different types of guitar. The key characteristics of a guitar are whether their output type ie acoustic, semiacoustic or electric and the number of strings.
Define an interface called Guitar that implements the abstract void methods outputType and numStrings. Next, define a class Stratocaster that implements Guitar and redefines the methods outputType and numStrings to print "Electric" and respectively. Question
Goal: Learn how to use inheritance with interfaces electric and the number of strings.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
