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 instruments We need to specify whether a strings instrument uses a bow We need to specify whether a wind instrument uses a reed Build 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 Strings family. Your constructors should be set up to match the objects created in the InstrumentTester class. These are the files given
public 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: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
How can you know if the person or organization providing the information has the credentials and knowledge to speak on this topic? one clue is the type of web site it is--the domain name ".org" tells you that this site is run by a nonprofit organization.
Answers: 2
question
Computers and Technology, 22.06.2019 05:00
Which two editions of windows 7 support 64 bit cpus? choose two out of professional, business, starter, or home premium.
Answers: 1
question
Computers and Technology, 22.06.2019 16:30
Primary tech skills are skills that are necessary for success in online education
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
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, 28.03.2020 01:44
question
Mathematics, 28.03.2020 01:44
question
French, 28.03.2020 01:44
question
Chemistry, 28.03.2020 01:44
question
Mathematics, 28.03.2020 01:44