1
DESIGN DOCUMENT
1. Use Case Diagram:
Use case diagram is a graph of actors, set of use cases enclosed by a system boundary, communication (participation) association between the actors and the use cases and a generalization among the use cases.
Fig 1. Use case Diagram for Online Shopping
Actor:
An actor represent a set of roles that user of a use case play when interacting with the use cases. Actor identified here is Administrator and Staff.
Use Case:
A use case is a description of a set of sequence of actions that a system performs to yield result of value to an actor. The Use Cases described are,
1. 2. 3. 4. 5. 6. 7.
Login Select a product Add New product Update product Delete product Calculate the bill Display bill
Login use case is to describe that the administrator can login to their account. Logout use case is to describe that the administrator can logout from their account. Add New product use case describes that; the administrator can add new product to the database. Update product use case describes that the Administrator can update the product. The Delete product use case describes that the Administrator can delete the product. The use case View calculate the bill describes that, the system displays the bill details of the customers from the database.
2. Sequence Diagram:
Sequence diagrams are easy and intuitive way of describing the behavior of a system by viewing the interaction between the system and its environment. A sequence diagram shows an interaction arranged in a time sequence. The objects used in this sequence diagram are, 1. User 2. Login 3. Calculate 4. Add to cart
Fig 2. Sequence Diagram for Online Shopping
3. Collaboration Diagram
Fig 3. Collaboration Diagram for Online Shopping A collaboration diagram represents a collaboration, which is a set of objects related in a particular context, and interaction, which is a set of messages exchanged among the objects within the collaboration to achieve a desired outcome. In this collaboration diagram, the objects are represented as rectangle, the actors are stick figures. Whereas the sequence diagram illustrates the object and actor interaction overtime, the collaboration diagram shows the object and actor interaction without reference to time. In ONLINE SHOPPING each object interacts with each other or collaborates with each other; it gets represented by the solid line drawn between them.
4. Activity Diagram :
Fig 4. Activity Diagram for Online Shopping
The activity diagram describes the sequencing of activities with support for both conditional and parallel behavior. The Activity diagram is used to describe the various activities taking place in an application. Here in ONLINE SHOPPING, we have various activities starting from login.
After login, the user selection activity gets performed, where the user can be an administrator or customer. If the user is an administrator, then they have to enter their name and password and only when those details are valid they can access the system. They can calculate the current salary obtained by the staffs, they can add new product, and they can update the values of the records which gets stored in the database. If the user is a staff then they can view their salary details only.
5. Class Diagram :
Class diagrams show the interactions between classes in the system. Class diagram also shows the attributes and operation of a class and the constraints that apply to the way objects are connected. Classes contain information and behavior that acts on that information. Each class on class diagram is represented by rectangle divided into three sections. The first section shows the class name, second section shows the attributes the class contains and last section contains the operation of the class. In ONLINE SHOPPING, the classes identified are
1. 2. 3. 4. 5. 6. 7.
Login Select a product Add New product Update product Delete product Calculate the bill Display bill
Each class has its own attributes and operations. Login classThe attributes defined is administrator and staff. The method identified is Login.
Fig 5. Class Diagram for Online Shopping Select a product - The attributes are Product ID, Product Name, Price of the product. The operation identified is Add New Product. Update Product - The attributes are Product name, Price of the product. The operation defined is Update. Calculate the Bill- The attributes Product ID, Product Name, Price of the Product. The operations defined are Add, Update and Display.