Sale!

The student is allowed to rent 3 books for free: one e-book and 2 hard copy books. Once limit is reached, a thank you message will be displayed as shown below.

(3 customer reviews)

Original price was: $40.00.Current price is: $30.00.

Download button will appear immediately after successful payment.

Book your next exam with us and get A+ in entire semester, guaranteed!

Description

The student is allowed to rent 3 books for free: one e-book and 2 hard copy books. Once limit is reached, a thank you message will be displayed as shown below. If hardcopy book name starts with capital f (e.g. F), it's known to be fiction which is given price 40 SAR by default. Use only noargs constructors in creating objects in the Test class.

Sample Run:

Welcome to Alfaisal Bookstore! 
You are allowed 3 rentals 

Which e-book you want to rent? 
Hello 
pdf size is 5 MB 
You are allowed 2 rentals 

Which hardcopy book you want to rent? 
(F before book name indicates Fiction): 
FHello renting E books cost: 40.0 SAR 
You are allowed 1 rentals 

Which hardcopy book you want to rent? 
(F before book name indicates Fiction): 
FHi 
renting E books cost: 40.0 SAR 
Thanks for trying us.. You reached the limit of renting

If 3rd input was empty, handle any possible exception: (Bonus 2%)

 Which hardcopy book you want to rent? 
 (F before book name indicates Fiction):
 Warning.. Invalid Input
 

Build a java program that has the following hierarchy of classes: 

Notes:

  • Pdf side is randomly generated number between 0 and 1000
  • Hardcopy book name starting with "F" uses price method in fiction class (40 per item)
  • Rental limit is decremented every time you rent a book

You may also like…

Billing details

Additional information

Your order

Product
Quantity
Total
Cart Subtotal $0.00
Order Total $0.00