Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(30 points) You are going to develop a class to represent Songs, *For the instance variables, add the below ones. Make sure that these values

image text in transcribed

(30 points) You are going to develop a class to represent Songs, *For the instance variables, add the below ones. Make sure that these values cannot be accessed from other dasses. Name of the artist Name of the song Duration of the song in seconds) play count *Write at least two constructors (not the delaut one) (Hint: When you first create a song, play count should be 0) *For this class, make sure you follow the encapsulation rules. Add methods that you think are necessary for encapsulation *Add an additional play method that increases the play countil -Override the toString method, hezurn everything in a proper format Implement a class that will represend a Musicalbum that contains songs for the instance variables. add the below ones. Make sure that these values cannot be accessed from other desses name of the album number of song sorge Write at least two constructors that the default one For this class, make sure you follow the antepsulation rules made methods that you thir are recessary for encapsulation

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

More Books

Students also viewed these Databases questions