Using your musicalinstrument class

Assignment Help JAVA Programming
Reference no: EM13168168

  1. Create a class named MusicalInstrument and its four subclasses named Woodwind, Brass, String and Percussion.
  2. 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.
  3. Finally, create a Java test class that simulates using your MusicalInstrument class.  In your test class you should at a minimum: a) Construct 4 instances of your instrument, b) tune your instruments, c) print the name of your instrument d) print how you play your instrument  
  4. 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.

Reference no: EM13168168

Write a program using java script to convert a currency

Write a program using Java Script to convert a currency from dollars onto euro. If the rate of conversion is for each Euro 1.8 dollars. The use shall continue to convers as

Write java program to enter number of marks

Write a java program called This program should allow the user to enter any number of marks and then display the minimum, maximum & average mark.

Java program- displays all the details of stations

Write a Java program called codes. java that, firstly, prompts (asks) the user to enter an input file name. This is the name of a text file that can contain any number of re

Develop a good understanding of how this code works.

By now you should have studied the original version of the SalesAward and related classes. You should have a good understanding of the SalesTeam and SalesAward classes. You

Create java program to simulate the operation of a bank atm

write a Java program to simulate the operation of a bank ATM (cashpoint) system for payment and deposit on an account. In order to make the system fairly simple there is onl

How large a value can be stored in an integer variable

Most programming languages have a built-in integer data type. Normally this representation has a fixed size, thus placing a limit on how large a value can be stored in an in

Sequential search algorithm

Write a Java program to fill an array of integers with 1000 randomly generated integers and sorts these numbers using selection sort. Then the program asks the user to choos

Design and develop mobile web application

HC2051 Mobile Web Applications Development. In this group assignment (maximum 5 students) requirement, you are required to design and develop mobile web application using any


Write a Review

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd