Question: Java Problem: Define a class named book. The class has the following members: - Private instance variables title of type String, isbn of type String,
Java Problem:
Define a class named book. The class has the following members:
- Private instance variables title of type String, isbn of type String, and price of type double.
- A public no-arg constructor that sets title to "The Prince", isbn to "978-1514649312", and price to 6.99.
- A public constructor that takes three arguments and sets the instance variables accordingly.
- Public getter and setter methods for the instances variable isbn.
- A public method named displayBook that does not take any argument and does not return any value. The method displays the instance variables of this object.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
