Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

What is behavioral persuasion in advertising designed to do?

Answered: 1 week ago