The question
Cik Mat operates bookstore. During their promotion period, there are books which are sold with special discounts, while others are sold at normal price. Write a program which simulates a point-of-sale (POS) system.
Customers buy books. To simplify, you may want to limit that a customer can buy only a maximum of 5 books for each transaction. However, the program will be better if a customer can buy and pay for any number of books he wants.
Use the following information. Make use of loops and overloaded methods if necessary.
1. Create a book class. Every book has these attributes: title, author, ISBN, price and discount (discount is 0 if the book is sold at normal price). Write appropriate constructors for this class.
2. Create a bookstore class for the bookstore. At the bookstore, the staff can do the following:
• Key-in the information about the book(s) that a customer buys:
i. Book title
ii. Author
iii. ISBN
iv. Price
v. Discount
vi. Other inputs as necessary
• Calculate the total amount that a customer has to pay for all books he bought.• Receive payment from the customer.
• Return balance to the customer
Cik Mat operates bookstore. During their promotion period, there are books which are sold with special discounts, while others are sold at normal price. Write a program which simulates a point-of-sale (POS) system.
Customers buy books. To simplify, you may want to limit that a customer can buy only a maximum of 5 books for each transaction. However, the program will be better if a customer can buy and pay for any number of books he wants.
Use the following information. Make use of loops and overloaded methods if necessary.
1. Create a book class. Every book has these attributes: title, author, ISBN, price and discount (discount is 0 if the book is sold at normal price). Write appropriate constructors for this class.
2. Create a bookstore class for the bookstore. At the bookstore, the staff can do the following:
• Key-in the information about the book(s) that a customer buys:
i. Book title
ii. Author
iii. ISBN
iv. Price
v. Discount
vi. Other inputs as necessary
• Calculate the total amount that a customer has to pay for all books he bought.• Receive payment from the customer.
• Return balance to the customer
Comment