Reference no: EM13692226
Question: Create a class named MusicalInstrument and its four subclasses named Woodwind, Brass, String and Percussion.
The MusicalInstrument has a name, isPlaying, and isTuned data fields. It also has methods for setting and getting the values of each of the fields along with a method to display how the instrument is played.
A constructor that sets the isTuned and isPlaying fields to false is also included in the MusicalInstrument class.
You are welcome to add additional data fields and methods if you like.
Finally, create a Java test class that simulates using your MusicalInstrument class. In your test class you should at a minimum:
1) Construct 4 instances of your instrument,
2) tune your instruments,
3) print the name of your instrument
4) print how you play your instrument
In order to exercise polymorphism, please declare in the test class an array with 4 elements of type MusicalInstrument, and populate it with objects of each of the subclasses.
Include comments in code section. Code this in java programming.
What do you recommend he do about making a backup
: What do you recommend he do about making a backup - The chief financial officer (CFO) of NCWR keeps a huge number of reports, spreadsheets, and other critical financial information on his computer
|
How many data links will there be along
: How many data links will there be along the way when Host R transmits a packet to Host S - How many routes?
|
Explain how you can extend the sci capability
: Explain how you can extend the SCI capability to RF and Bluetooth communication - Imagine an RFID device connected to SCI0 that sends a 16 character code to the DB-12 board when an item is swiped
|
Determine if the given subset is a subspace
: Determine if the given subset is a subspace of the given vector space. Prove your claim - Is the set P of all polynomials of the form p(x) = a+x2, with a ? R, a subspace of P2?
|
Construct 4 instances of your instrument
: Create a Java test class that simulates using your MusicalInstrument class. In your test class you should at a minimum construct 4 instances of your instrument,
|
How could those redundancies lead to anomalies
: If you want to produce a listing of the file contents by last name, area code, city, state, or zip code, how would you alter the file structure?
|
What is the inductive hypothesis
: Show that the base case is true and What is the inductive hypothesis P(k)?
|
How might the tables be related to one another
: What tables would you create, and what would the table components be and How might the (independent) tables be related to one another?
|
Designing the instruction set
: For a 3-operand ADD instruction that only uses register addressing mode, how long (number of bits) should the instruction be?
|