Reference no: EM1321626
1) Develop and implement the stringed musical instrument class utilizing the following guidelines:
a) Data fields for your instrument must involve the number of strings, an array of string names representing the string names (e.g.E,A,D,G), and boolean fields to estimate if the instrument is tuned, and if the instrument is presently playing. You are welcome to add the additional data fields if you like.
b) A constructor method which set the tuned and currently playing fields to false.
c) Other methods 1) to tune the instrument, 2) to begin the instrument playing, and 3) to stop the instrument from playing.
d) Any other methods as you observe as fit (Add at least one unique method).
2) Create a UML class diagram using a diagram tool (e.g. PPT, Visio) of your choice. Prepare the diagrams and place them in a word document along with a brief description of each of your classes.
3) Create Java classes for your instruments. Be sure that your code matches your design specifications and some minimal functionality is included. For example, if you called the violin.play() method, you should at least print that the violin is playing. Similar functionality should be supplied when you stop playing, tune or call any of your methods. For example:
public void playviolin() {
System.out.println("The violin is now playing.");
}
4) Write down the output from your Instrument class methods in order to text file that a user entered from command line arguments (e.g. java Mynamep3tst myfilename.txt). This enables your program in order to accept the filenames from the user through a command line argument.
5) Finally, generate a Java test class which simulates utilizing your instrument class. a) Construct 10 examples of your instrument, b) tune your instruments, c) Start playing your instrument, d) Call your unique method, and e) Stop playing your instruments.