Question: java Create a class called Book which include five data members. 1- BookName [ String ] 2- Booktype [char] 3- publisher [string] 4- BID [

java

Create a class called Book which include five data members.

1- BookName [ String ] 2- Booktype [char] 3- publisher [string] 4- BID [ int] 5- price [double]

Provide a constructor that initializes all data members and also a pramitrized constructor. Provide a set and a get method for each data member. Provide a method display() that displays all the book information.

Provide a method check_booktype() which has these values: c = 100 e = 200 p = 300 g = 400

if the book price grater than or equal the book type, print [Price of book is more than given value] and display thr book information. otherwise print [Price of book is not more than given value] without displaying the book information.

In the main method , create 4 objects [ book1, book2, book3 and book4]

book1 [ default values] book2 [ use the constructor ] [ Book name :Introduction to Java Book type : p publisher : ABC BID : 1234 price : 200.0 ] book3 [ use setter ] book4 [ just change BID using setter by input and then display the information after the updating ]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!