Class, State Trans, Usecase
Class, State Trans, Usecase
SUBMITTED BY:
ARUN.U
21BCE3187
1|Page
Assessment – III
Introduction:
Advantages:
Clarity: STDs provide a clear and concise picture of the order
lifecycle, making it easier to understand how orders flow within
your system. This is beneficial for developers, system analysts,
and anyone needing to grasp the overall order handling
process.
Communication: These diagrams act as a common language for
discussing your system's functionalities with stakeholders. They
can be used to identify potential bottlenecks, areas for
2|Page
improvement, and ensure a smooth order fulfillment
experience.
Error Identification: By visualizing the transitions between
states, STDs can help pinpoint potential issues in the order
handling process. For instance, an STD might reveal a missing
state for handling order cancellations or a lack of clarity on how
backordered items are managed.
Documentation: STDs serve as documentation for the system's
behaviour, especially helpful when maintaining or modifying
the Eye Optical Management System in the future.
Disadvantages:
Complexity: As your system grows and the order fullfillment
process becomes more intricate, STD can become cluttered and
difficult to understand. It's important to maintain focus on core
states and transitions to avoid overwhelming complexity.
Limited Scope: STDs primarily focus on the order lifecycle. They
are less suited for modelling complex business rules or user
interactions within your system. Use case diagrams or other
behavioural modelling techniques might be more appropriate
for those aspects.
Oversimplification: While beneficial, STDs may not capture
every intricate detail of the real-world order fulfillment process.
There might be exceptions or edge cases that the STD doesn't
explicitly represent.
3|Page
Components and Relationships:
States:
Pending: Customer places an order, awaiting confirmation.
Payment Processing: Order is confirmed, payment is being
processed.
Invoice Generation: Payment successful, order is being
prepared.
On Hold: Payment issue or awaiting customer information (e.g.,
prescription details).
Order Shipped: Order is packaged and shipped to the customer.
Delivered: Order is received by the customer.
Cancelled: Order is cancelled by the customer or due to stock
issues.
4|Page
Cancelled: Final state, no further transitions (can occur from
multiple states).
5|Page
State Transition Diagram (Star UML):
6|Page
This Use Case Diagram (UCD) visually depicts the essential functions
(use cases) of the Eye Optical Management System and the
interactions between users (actors) and these functions.
This UCD helps stakeholders (developers, managers, etc.) grasp the
system's capabilities and intended user flows.
Use Cases
Relationships
Associations
Customer -> Browse Products
Customer -> Add to Cart
Customer -> Place Order
8|Page
Customer -> View Order Status
Customer -> Update/Cancel Order
Customer -> Inquiries and Feedback
Admin -> Manage Products
Admin -> Update Stock
Employee -> Process Payment
Employee -> Inquiries and Feedback
Employee -> Process Order
Employee -> Update Stock
Include
Place Order <<include>> Process Payment
Update Stock <<include>> Promotions and Sales Update
Extend
Update/Cancel Order <<extend>> Request Return/Exchange
Advantages
9|Page
Foundation for Development: Provides a blueprint to guide
system design and implementation.
Disadvantages
10 | P a g e
Use Case Diagram:
11 | P a g e
Class model:
1.Introduction
In object-oriented programming (OOP), a class is a blueprint or
template for creating objects. Objects are instances of classes, and
each class defines a set of attributes (data members) and methods
(functions or procedures) that the objects created from that class will
possess. The attributes represent the characteristics or properties of
the object, while the methods define the behaviours or actions that
the object can perform.
This class diagram serves as a blueprint for the object-oriented code
of our Eye Optical Management System. It illustrates how objects like
Customer, Order, and Product interact with each other, providing a
framework for our system's implementation
operations:
Registers()
Login()
Update power specifications()(lens)
Browse Products()
12 | P a g e
Place order()
Update profile()
Inquiries and feedback()
Order
orderID: int
customerID: int
orderDate: Date
orderStatus: String
deliveryID: int
OrderItem (Connecting Order and Product)
operations:
Add n remove item()
Update quantity()
Confirm order()
Cancel order()
Product
productID: int
name: String
type: String
brand: String
price: double
stock: int
operations:
Update()
Payment
paymentID: int
13 | P a g e
orderID: int
amount: double
paymentMethod: String
paymentDate: Date
operations:
Process Payment()
Generate receipt()
Delivery
deliveryID: int
orderID: int
shippingAddress: String
deliveryStatus: String
deliveryDate: Date
operations:
Update Status()
Employee
employeeID: int
name: String
Address: String
Contact: String
Department: String
operations:
Inquiries and feedback()
14 | P a g e
Process Payment()
Process order()
Update stock()
Admin
adminID: int
Name
Contact
operations:
Manage Product()
Update stock()
Relationships
Maintainability
As the system evolves, the class diagram can be updated
to reflect the changes, aiding in ongoing system
maintenance.
Disadvantages :
Potential Complexity
While this initial version focuses on core classes, adding
more features or intricate functionalities might increase
complexity.
Consider separate diagrams for specific functionalities if
needed.
Limited Scope
Class diagrams primarily focus on object interactions.
They don't directly represent database interactions or
User Interface details.
It might need additional diagrams (e.g., Sequence
Diagrams) to depict these aspects comprehensively.
Level of Detail
This is a well-structured starting point. Depending on the
project's needs, it might need to add more details like:
Data types for attributes (e.g., int for stockLevel)
16 | P a g e
Specific operations for some classes (e.g., Employee:
updateInventory())
4.Construction:
Begin by meticulously identifying the core entities within
the system. These entities, such as Customer, Order,
Product, and so forth, translate to classes in the diagram.
Each class represents a distinct concept with its own well-
defined attributes and operations.
17 | P a g e
Aggregation(not yet included) : A diamond-shaped head
on the association line signifies a stronger relationship,
where one class exists as part of the whole (e.g.,
OrderItem referencing a Product).
Inheritance (not yet included): An open triangle
arrowhead points from the subclass to the superclass,
indicating the subclass inherits attributes and behaviors
(e.g., Admin inheriting from Employee)
Class Diagram:
18 | P a g e