Question: Need help with this exercise. I must create a class Song array. The duration field is a float number giving the length of the song

Need help with this exercise. I must create a class Song array. The duration field is a float number giving the length of the song in minutes. The Song constructor will create a song with the fields set to default values (String to , float to 0.0, int to 0). The setSong method will assignment the parameter values to the corresponding fields if the parameter value is a valid value. The toStringmethod will return a String representation of the song information (including all the fields) in a formatted way.

- title: String

- writer: String

- singer: String

- duration: float

- genre: String

- year: int

+Song()

+setSong(String, String, String, float, Sting, int)

+getTitle(): String

+getWriter(): String

+getSinger(): String

+getDuration(): float

+getGenre(): String

+getYear(): int

+toString():String

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!