You are on page 1of 1

Customer

- name: String MainClass


- orderHistory: ArrayList<Book>
+ main(String[]): void
+ Customer() 0..*
+ Customer(String)
+ placeOrder(Book, int) Book
+ viewOrderHistory()
- title: String
- author: String
- year: int
- price: double

0..* + Book()
+ Book(String, String, int, double)
+ getBookInfo()
+ calculateDiscountedPrice
(double): double
+ getTitle() : String
+ getPrice() : double
+ getAuthor(): String
+ getYear(): int

BookStore Discount
- availableBooks: ArrayList<Book> - discountPercentage: double
ShoppingCart
+ BookStore() + Discount(double)
+ BookStore(ArrayList<Book>) - cartItems: ArrayList<Book> + Discount(int)
+ displayAvailableBooks() + applyDiscount(double): double
+ ShoppingCart()
+ ShoppingCart(ArrayList<Book>)
+ addToCart(Book)
+ checkout(): double

You might also like