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 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
question
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 23.06.2019 09:00
Which is the highest level of the hierarchy of needs model? a. humanity b. intrapersonal c. team d. interpersonal
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, 31.08.2019 22:30
question
Mathematics, 31.08.2019 22:30
Questions on the website: 13722367