Determine the classes needed for an order tracking system

Question: Determine the classes needed for an order tracking system with the following specifications:
Customers can place one order for any number of products. Every product has a product number, product description, and price. A customer can order more than one product at once (in one order). When a customer orders two products in one order, and product 1 is in stock and product 2 is not, then we ship first product 1, and later ship product 2. We need to keep track of the status of every order, and shipping date of every product. At this moment we make a distinction between corporate customers and personal customers. For all customers, we keep track of their credit rating. Corporate customers can have an excellent, good, or poor credit rating. Personal customers have by default a poor credit rating. If the credit rating is poor, then the order must be prepaid before we send out the product. This means that all orders from personal customers must be prepaid by credit card. If the credit rating is not poor, then the order does not need to be prepaid. Every corporate customer also has a certain credit limit. If the total order price is higher than the credit limit, the order must be prepaid. The system will generate a monthly bill for all corporate customers who did not prepay their order(s).
When a customer buys a lot of products at our store, we want to reward that customer with a certain discount. If customers buy a computer-related product, then they get two points for every computer-related product they buy. For every health-related product, they get one point, and for every audio/video related product, they get 1/2 point. For all other products, they get 1/4 point. If customers accumulate 25 points, they get a 40% discount on their next order. If they receive this discount, then their number of points is reset to zero.

Although I have to determine only classes I have made the UML diagram so you can separate the classes as per your requirements:

Following are the classes that I have found appropriate:

  1. Product
  2. A Customer
    Corporate Customer
    Personal Customer
  1. Order
  2. Points
  • Computer Points
  • Audio Video Points
  • Health Points
  • Other Points

1. Product

The product should be in class because it is to be ordered by the customer and each product has some points.

2. Customer

A customer should be class because customers are the one who orders the products and they differentiate into two more customer corporate customer and personal customer.

Each corporate customer and the personal customer have their own characteristics so they must be made another class.

3. Order

Customer orders products so we need to take one class for each order.

4. Points

Each product has points assigned as per products. So there will be points class and its subclasses will be computer points, audio-video points, health points, and other points

Previous articleUncaught TypeError: Object [object Object] has no method ‘live’ in Opencart when using jquery-2.1.0.min.js
Next articleShow files and folders in WordPress file-away plugins


Please enter your comment!
Please enter your name here