Introduction To Software Engineering Lab 4
Introduction To Software Engineering Lab 4
ENGINEERING
LAB-4
OBJECTIVE: TO PRACTICE HOW TO DEVELOP
CLASS DIAGRAM FOR THE GIVEN SCENARIOS
CLASS DIAGRAM:
A class diagram depicts classes and their interrelationships.
Used for describing structure and behavior in the use cases.
Attributes
Operations
CLASS DIAGRAM:
Modifiers are used to indicate visibility of attributes and
operations.
‘+’ is used to denote Public visibility (everyone)
◦User.
◦ Customer.
◦ Admin.
◦ Shopping Cart.
◦ Shipping Info.
◦ Orders.
◦ Order Details.
User:
Attributes: Id, password, login status.
Customer
Admin:
Methods: Add cart item, Update quantity, view cart details, check out.
Orders:
Shipping Info:
Order Details:
Attributes: Order ID, Product ID, product name, quantity, unit cost,
total.
Methods: Calculate Price
EXTRA LAB TASK
Customer: Represents the customers using the car rental service. It has attributes like
customerID, name, and contactInfo, as well as methods like rentCar() and returnCar().
Car: Represents the individual cars available for rental. It has attributes like carID,
model, make, and rentalStatus.
Rental Agency: Represents the car rental agency. It has attributes like agencyName
and location, and a relationship with Car indicating the cars available for rent.
Rental Transaction: Represents a rental transaction. It has attributes like
transactionID, rentalDate, and returnDate. It also has a relationship with Customer
and Car.
Payment: Represents the payment process for a rental. It has attributes like
paymentID, amount, and a relationship with RentalTransaction.
Employee: Represents the employees of the rental agency. It has attributes like
employeeID, name, and role.
Reservation: Represents car reservations made by customers. It has attributes like
reservationID, reservationDate, and a relationship with Customer and Car.
Location: Represents the locations where the rental agency operates. It has attributes
like locationID, address, and a relationship with RentalAgency.