subject

In this exercise, you are going to build a hierarchy to create instrument objects. We are going to create part of the orchestra using three classes, Instrument, Wind, and Strings. Note that the Strings class has a name very close to the String class, so be careful with your naming convention!We need to save the following characteristics:Name and family should be saved for all instrumentsWe need to specify whether a strings instrument uses a bowWe need to specify whether a wind instrument uses a reedBuild the classes out with getters and setters for all classes. Only the superclass needs a toString and the toString should print like this:Violin is a member of the String family. Your constructors should be set up to match the objects created in the InstrumentTester class. These are the files givenpublic class InstrumentTester{public static void main(String[] args){/*** Don't Change This Tester Class!** When you are finished, this should run without error.*/Wind tuba = new Wind("Tuba", "Brass", false);Wind clarinet = new Wind("Clarinet", "Woodwind", true); Strings violin = new Strings("Violin", true);Strings harp = new Strings("Harp", false); System. out. println(tuba);System. out. println(clarinet); System. out. println(violin);System. out. println(harp);}}public class Wind extends Instrument{}public class Strings extends Instrument{ }public class Instrument{ }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 07:30
By refraining from constructing a building until they are certain that it will not cause harm to the environment, an organization is adhering to the
Answers: 2
question
Computers and Technology, 23.06.2019 00:20
The open systems interconnection (osi) reference model: defines standards for many aspects of computing and communications within a network. is a generic description for how computers use multiple layers of protocol rules to communicate across a network. defines standards for wireless local area network (wlan) communication protocols. details the advantages and disadvantages of various basic network cabling options.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Best laptops for college [$100-$500 range]?
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
Which finger presses the h key on the keyboard? index finger on the left hand pinky finger on the right hand index finger on the right hand thumb on the left hand
Answers: 1
You know the right answer?
In this exercise, you are going to build a hierarchy to create instrument objects. We are going to c...
Questions
question
Mathematics, 04.12.2019 13:31
Questions on the website: 13722363