subject

You are going to be working with 4 classes, a Book superclass with TextBook and Novel subclasses, and a BookTester class to run your program. For the Book, TextBook, and Novel class, you will create a constructor and all getters and setters. Be sure to follow standard naming conventions for your getters and setters! Additional information for each class is below. Book Class
The Book class will have a title and author as instance variables and the constructor should follow this format:
public Book(String title, String author)
TextBook Class
The TextBook class will have a subject and edition as instance variables and the constructor should follow this format:
public TextBook(String title, String author,
String subject, String edition)
Novel Class
The Novel class will have a genre and pages as instance variables and the constructor should follow this format:
public Novel(String title, String author,
String genre, int pages)
BookTester
In the tester class, you should create an ArrayList that will store all the books in your library. Then create you library by adding at least 3 textbooks and 3 novels to the ArrayList.
After creating your library, use a loop to access the ArrayList and print out any information you have access to.
public class Novel extends Book
{
// Start here!
}
public class Book
{
// Start here!
}
public class TextBook extends Book
{
// Start here!
}
import java. util. ArrayList;
public class BookTester
{
public static void main(String[] args)
{
// Start here!
}
}

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 15:00, miracle9704
Atool that matches persoal skills qualities interests and talets to a career is called a
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, Zieken993
Martha is designing a single-player game. her manager suggests that she plan the design to incorporate future modifications. which principle of game design relates to planning for future modifications?
Answers: 1
image
Computers and Technology, 23.06.2019 19:40, Latoyajenjins1789
Use a physical stopwatch to record the length of time it takes to run the program. calculate the difference obtained by calls to the method system. currenttimemillis() just before the start of the algorithm and just after the end of the algorithm. calculate the difference obtained by calls to the method system. currenttimemillis() at the start of the program and at the end of the program so that the elapsed time includes the display of the result. use the value returned by the method system. currenttimemillis() just after the end of the algorithm as the elapsed time.
Answers: 3
image
Computers and Technology, 24.06.2019 11:00, zeesharpe05
These statements describe lists in presentation programs: a. bullets can be turned off and on. b. bullets cannot be turned off. c. bullet styles, colors, and sizes can be changed. d. lists don't have to use bullets or numbers. e. numbering styles, colors, and sizes can be changed. f. numbers can be turned off and on. g. numbers cannot be turned off. select all that apply
Answers: 2
You know the right answer?
You are going to be working with 4 classes, a Book superclass with TextBook and Novel subclasses, an...

Questions in other subjects:

Konu
Chemistry, 18.10.2021 17:30
Konu
Geography, 18.10.2021 17:30
Konu
Mathematics, 18.10.2021 17:30