Needs Written Java Radio Station Kjava Wants Class Keep Track Recordings Plays Create Clas Q37108250

Needs to be written in Java

Radio station KJAVA wants a class to keep track of recordings itplays. Create a class named Recording that contains fields to holdmethods for setting and getting a Recording’s title, artist, andplaying time in seconds.

Write an application that instantiates five Recording objectsand prompts the user for values for the data fields. Then promptthe user to enter which field the Recordingsshould be sortedby—(S)ong title, (A)rtist, orplaying (T)ime. Perform the requested sortprocedure, and display the Recording objects.


Solution


//Recording.java

public class Recording
{
   String title, artist;
   int playingTime;
   public String getTitle() {
       return title;
   }
   public void setTitle(String title)

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.