Question: 1 . Create a Song class, where the song has a title ( String ) , writer ( String ) , artist ( String )

1. Create a Song class, where the song has a title (String), writer (String), artist (String)
duration(int) and genre (String).
2. Create TWO Song constructors.
a) First constructor takes song title and artist through constructor parameter.
b) Second constructor takes EACH of the above five Instance variables values
through constructor parameter.
3. Create accessor and mutator functions for EACH of the five Instance variables, i.e.
five accessor functions and five mutator functions.
4. Create a main function, where the program is going to ask the USER to enter details
through which you should create TWO song objects
a) For the First song object, the USER will only provide song title and artist
b) For the Second song object, the USER will provide ALL the song information
(for all Instance variables).
5. Demonstrate through the main function the followings:
a) Use ACCESSOR functions from song class to display allsong information
b) Use MUTATOR functions from song class to modify song ARTIST and GENRE
and display all song information AGAIN

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!