Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In JAVA Part A: Book class (Total: 40 points] a. Add another .java file called Book into the same folder MidtermExam1 Makeup. [5 points) b.
In JAVA
Part A: Book class (Total: 40 points] a. Add another .java file called Book into the same folder MidtermExam1 Makeup. [5 points) b. Add the following private instance variables. [5 points] Variable name title author price id isReference Data type String String double int boolean c. Generate setters and getters for the instance variables. [5 points) d. Add the following new constructor. [10 points) as public Book(String title, String author): Takes the title and the parameters and sets the instance variables. Set the remaining instance variables to random values as follows. Variable name price id isReference Description (both lower and upper bounds are inclusive) Set to a random double number between 25.0 - 150.5 Set to a random integer number between 1 - 5000 Set to true if the id is less than 500. Set to false otherwise. e. Add the displayInfo() method which displays the Car information as follows. [5 points)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