Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the Java programs that meet the following requirements:- 3a. Radio station

ID: 674354 • Letter: W

Question

Write the Java programs that meet the following requirements:-

3a. Radio station JAVA wants a class to keep track of recordings it plays. Create a class named Recording that contains fields to hold methods for setting and getting a Recording’s title, artist, and playing time in seconds. Save the file as Recording.java.

b. Write an application that instantiates five Recording objects and prompts the user for values for the data fields. Then prompt the user to enter which field the Recordings should be sorted by—song title, artist, or playing time. Perform the requested sort procedure, and display the Recording objects. Save the file as RecordingSort.java.

Please explain each step. I am a beginner so please write program in beginner fashion. Thanks!

Explanation / Answer

public class LibraryBook { String bookTitle; String bookAuthor; int bookPageCount; public LibraryBook(String title, String author, int count) { bookTitle = title; bookAuthor = author; bookPageCount = count; } public String getBookTitle() { return bookTitle; } public String getBookAuthor() { return bookAuthor; } public int getBookPageCount() { return bookPageCount; } } Code for LibraryBookSort.java: import java.util.Arrays; import java.util.Scanner; public class LibraryBookSort { public static void main(String[] args) { LibraryBook[] book = new LibraryBook[5]; book[0] = new LibraryBook("Java Programming", "Joyce Farrell", 881); book[1] = new LibraryBook("Team Of Rivals", "Dorris Kearns Goodwin", 994); book[2] = new LibraryBook("1776", "Daivd McCullough", 400); book[3] = new LibraryBook("No Ordinary Time", "Dorris Kearns Goodwin", 768); book[4] = new LibraryBook("Steve Jobs", "Walter Isaacson", 656); for (int x = 0; x
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote