Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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); d

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Donald A. Carpenter Fred R. McFadden

1st Edition

8178088045, 978-8178088044

More Books

Students also viewed these Databases questions

Question

What is a joint cost? What is a separable cost?

Answered: 1 week ago

Question

Describe the factors influencing of performance appraisal.

Answered: 1 week ago