Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Solve using java please Exercise 5: Creating a CDimage Class using Composition (has a relationship) 6.1 Create a new project, call it Lab6Proj6, create class
Solve using java please
Exercise 5: Creating a CDimage Class using Composition (has a relationship) 6.1 Create a new project, call it Lab6Proj6, create class Song as it is given below 6.2 Create a CDimage class to represent a music CD. The constructor takes four parameters: the title of the CD and three songs. The CDimage class uses the song class and should contain methods to accomplish the following: The necessary set and get methods. CDTime() method to return the total time of the CD in minutes. . toString() method to print the CD title and the three songs (title, artist and duration) 6.3 Write a program CDImage Test that tests all of the methods in the CDimage class 6.4 Add Javadoc comments to document this project and then generate the intended documentation. /" Song.java is a class for maintaining basic information about a song. * Created and Modified by William Mullally */ public class Song private String title; private String artist; private int duration; //Constructors public Song (String songTitle, int songDuration) title - songtitle; duration = songDuration: artist = null; public Song (String songTitle, int songDuration, String songArtist) title = songTitle: duration = songDuration: artist - songartist; //Accessors public String getTitle() return title; { { public String getArtist() return artist; public int getDuration() return duration: { public void setArtist(String songArtist) artist - songArtisti //toString public String toString() { return String.format("Song: ts by ts of duration (mins) title, artist, duration); dStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started