...

/

Class Diagram for the Amazon Online Shopping System

Class Diagram for the Amazon Online Shopping System

Learn to create a class diagram for Amazon using the bottom-up approach.

In this lesson, we’ll identify and design the classes, abstract classes, and interfaces based on the requirements that we have previously gathered from the interviewer in our Amazon shopping system.

Components of Amazon

As mentioned earlier, we should design the Amazon online shopping system using a bottom-up approach.

Customer

The Customer abstract class refers to a user trying to buy a product from Amazon. Hence, it can access the items present in the shopping cart through the getShoppingCart() function.

A customer can be one of the following:

  1. Authenticated users

  2. Guest users

The details of these are given below:

  • The AuthenticatedUser class refers to an individual that contains a registered account on Amazon.

  • The Guest class refers to an individual without an account who can only search for and view the products on the Amazon website and add them to the shopping cart. However, they need to register an account on Amazon to place an order.

The class diagram of all these is provided below:

Press + to interact
The class diagram of the Customer class and its child classes
The class diagram of the Customer class and its child classes

Admin

The Admin class refers to an individual with a registered account on Amazon that can add, modify, or delete product categories and block users.

Press + to interact
The class diagram of the Admin class
The class diagram of the Admin class

Account

The Account class accesses and showcases the personal details of the authenticated user and the admin, who are the two types of registered accounts available in the system. Users with an account will have the option to add and access multiple shipping addresses as well as add and delete different products and product reviews.

Press + to interact
The class diagram of the Account class
The class diagram of the Account class

Product

The Product class contains the details of a particular product available on the Amazon shopping store. Each product will fall under a specific category present on Amazon and can have none, one, or more reviews.

Press + to interact
The class diagram of the Product class
The class diagram of the Product class
...