Question: Java programming Implement a mutable data type My Pod. Our My Pod is so simple so we can only add song and find song. An
Implement a mutable data type My Pod. Our My Pod is so simple so we can only add song and find song. An immutable data type Song is provided. Note that each song has fixed size of 8M. Song(String name, int size) Construct a song with name and its size Int get Size() Return the size of the song String get Name() Return the name of the song Our My Pod has limited capacity of 64M. For instance variables, you should have an array of Songs. The size of the array is determined based on the size of a song and the size of MyPod. M\ Pod() Construct an empty MyPod boolean findSong(Song s) Return true if the Song s is in MyPod, otherwise return false Boolean add Song(Song s) Return true of the Song s is added to the MyPod, otherwise return false
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
