Java source code classes and objects, computer programming, Programming Languages

Assignment Help:
Design and implement a stringed musical instrument class using the following guidelines:
a. Data fields for your instrument should include number of strings, an array of string names representing string names (e.g. E,A,D,G), and boolean fields to determine if the instrument is tuned, and if the instrument is currently playing. You are welcome to add additional data fields if you like.
b. A constructor method that set the tuned and currently playing fields to false.
c. Other methods 1) to tune the instrument, 2) to start the instrument playing, and 3) to stop the instrument from playing.
d. Other methods as you see 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 the output from your Instrument class methods to a text file that a user entered from the command line arguments (e.g. java Mynamep3tst myfilename.txt). This allows your program to accept filenames from the user via a command line argument.
5. Finally, create a Java test class that simulates using your instrument class. In your test class be you should at a minimum: a) Construct 10 instances of your instrument, b) tune your instruments, c) Start playing your instrument, d) Call your unique method, and e) Stop playing your instruments. (Hint: Arrays and Loops will make your job easier and result in more efficient code!)

Related Discussions:- Java source code classes and objects, computer programming

Shell script delete all lines from file contains word mca, Normal 0 ...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Create proptotype of student management system, XYZ International is a larg...

XYZ International is a large Institute; Management in this institute wants to create Proper Student management System. There for they contact you and asked you to create Propto typ

Visual Basic 2010 Karate Payments MDI Application, The following are requir...

The following are required for this lesson: Complete the Project "Adding New Payments," which is the Karate Payments that includes the Adding New Payments, Deleting Payments,

Opening and closing the document object on web page, Although the Document ...

Although the Document object's write()and writeln() methods are part of the DOM, they cannot be used to change content after a Web page has been rendered. You can write code that e

Java, how to save bulk entries at a time using collections?

how to save bulk entries at a time using collections?

Shell script to change the permission of a file, Normal 0 false...

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Display files specified in directory in format, W.A.S.S to display all the ...

W.A.S.S to display all the files in a specified directory in the following format: File  size in K        Date   Protection    Owner Program echo -e "Enter dir : \c" read di

I need help in travel and photo sharing website, Vacation Envy - Travel and...

Vacation Envy - Travel and Photo Sharing Website Site Overview- Vacation Envy is a travel as well as photo-sharing site. Make your travel map, share photos and show off al

Java event delegation model, Expertsmind brings you unique solution in jav...

Expertsmind brings you unique solution in java assignments Event Delegation Model The Delegation Model with java assignment help Version 1.1 of the Java TM foundation

Write a program to create map function, Given a list of numbers, say my ...

Given a list of numbers, say my @input_numbers = (1, 1, 3, 5, 8, 13, 21, 34, 55, 89, 144); write a program map1.pl that will use the function map (a) to produce a list of

Write Your Message!

Captcha
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