Purchase Solution

Java Programming: SchoolTextBook Class

Not what you're looking for?

Ask Custom 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.

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.

Purchase this Solution

Solution Summary

The expert examines SchoolTextBook Classes for java programming.

Solution Preview

import java.text.NumberFormat;

public class SchoolTextBook {

private String author; //1 for sorting
private String title; //2 for sorting
private int pageCount; //3 for sorting
private String isbn; //4 for sorting
private double price; //5 for sorting

public SchoolTextBook() {
}

public SchoolTextBook(String a, String t, int c, String ...

Purchase this Solution


Free BrainMass Quizzes
Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Javscript Basics

Quiz on basics of javascript programming language.

Basic Computer Terms

We use many basic terms like bit, pixel in our usual conversations about computers. Are we aware of what these mean? This little quiz is an attempt towards discovering that.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.

C++ Operators

This quiz tests a student's knowledge about C++ operators.