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

Create a class titled SchoolTextBook that contains fields for the author, title,

ID: 3584484 • Letter: C

Question

Create a class titled SchoolTextBook that contains fields for the author, title, page count, ISBN, and price. This SchoolTextBook class will also provide setter and getter methods for all fields. Save this class in a file titled SchoolTextBook.java. Then Write an application with an array that holds 5 instances of the SchoolTextBook class, filled without prompting the user for input. Next prompt the used to enter a field for sorting, sort the array of objects based on the user input, and then display the newly sorted array of objects. Save this class in a file titled SchoolTextBookSort.java.

Explanation / Answer

public class SchoolTextBook implements Cloneable { public static int nBooks = 0; public static String ISBN; private String title; private char type; //Single character since it will be read as a single // letter. private String status; private String[] author = new String[4]; private String publisher; private String dateborrowed; private String copyRightDate; private double price; private boolean checkedOut = false; // only need one *per mwvisa1* private boolean checkedIn = true; public SchoolTextBook (){} public SchoolTextBook(String a, String b, String[] c, String d, String e, double f) { ISBN = a; title = b; for (int i=0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote