Objectives
The objective of this assessment is for you to demonstrate your ability to design and implement an OO system consisting of a set of Java classes and a client program. In particular:
1. To design and implement classes with suitable fields, constructors, accessor methods, and modifier methods.
2. To conform to the standard conventions of Java.
3. To implement classes that are associated by inheritance, delegation, composition and aggregation.
4. To write a client application that uses your classes to show that they function correctly.
When shopping for groceries online a Customer chooses a Product and places an Order for some quantity of it. The order is added to a Cart. A Date is set for the delivery. More orders can be added to the cart, and they can be changed up until checking out.It is possible for products to have a discount rate applied, i.e. a DiscountProduct. The contents of the shopping cart can be sorted in various ways. Orders within a cart can be iterated over. To
support further features of the cart, orders and associated products can be tested for equality. The partial UML class diagram below shows the underlying data model you should use to achieve this scenario: