Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2 Create a program for Book record keeping below: (a) Create a class called Book to represent a book. A Book should include four
Question 2 Create a program for Book record keeping below: (a) Create a class called Book to represent a book. A Book should include four pieces of private information as instance variables-a book name, an ISBN number, an author name and a publisher. (4 marks) (b) Write the constructor that initializes the four instance variables. (6 marks) (c) Provide a mutator method and accessor method (query method) for each instance variable. (8 marks) (d) Provide a method named getBookInfol) that returns the description of the book as a String (the description should include all the information about the book). (2 marks) (e) Write a test application class named class BookTest (). Then, declare and create TWO (2) object for two elements in the class Book (). Display all the information for both object
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started