Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Lab Tasks

Name: Malaika Wahid Reg no. SP22-BSE-025


Course: Software Design and Architecture Class: BSE 4A
Lab Date: 03/10/23

Lab 1

Q. Flowchart for Cashier Program

Fig 1.1 Flowchart for Cashier Program

1
Lab Tasks

Lab 2
Task 1

All the possible actors:

1. Customer
2. Store Manager
3. Warehouse Person
4. Sales Assistant
5. Marketing

Task 2

All the possible Use Cases:

1. Place an Order
2. Process Order
3. Create Backorder
4. Process Payment
5. Check Progress
6. Make Refunds
7. Progress Orders
8. Monitor Stock Levels and Run-Rates
9. Print Summary Report of Sales
10. Maintain Product Catalog
11. Generate Sales report
12. Check Stock and Pricing
13. Access Sales Information

2
Lab Tasks

Use case diagram:

Fig 2.1 Detailed Use Case Diagram for Store Management System

3
Lab Tasks

Lab 3

Q. Detailed Use Cases for Cashier Program

Use Case 1

Use Case ID: UC001

Use Case Name: Place an Order


Actor Customer
Description: This use case describes how to place an order for products at a
Hurry's store.
Trigger: The customer clicks on “place order”.
Preconditions:
• The customer has successfully selected the product from the
Store’s catalog.
Postconditions: • An order is created and saved in the system.
• Inventory records are updated according to the purchase.
• If the customer chooses in-store pickup, they are provided
with information on when and where to collect their items.
• If the customer chooses delivery, they receive confirmation
and delivery charges message.
• A receipt is generated and given to the customer.

Normal Flow: 1. The customer enters the store or use the store's point of
sale system.
2. The customer selects products from the store’s catalog and
adds them to the order list.
3. The customer specifies the desired quantity for each
product.
4. The customer provides all the required information, such
as their name, contact details, and delivery address)
5. The customer selects the payment method, which can be
cash or credit card.

4
Lab Tasks

6. The customer receives confirmation of the order and


payment.

Alternative Flows If the customer cancels the order at any point before
confirming the payment, the order is not processed, and no
payment is made.
Exceptions: If the customer does not have access to the system due to
technical issues, the order placement process cannot proceed. It
throws an error

Use Case 2

Use Case ID: UC002

Use Case Name: Create Backorder


Actor Sales Assistant
Description: This use case describes the process of creating a backorder for
products that are out of stock at the store right now.
Trigger: The customer clicks on “Create Backorder”.
Preconditions: • The sales assistant is logged into the point of sale system.
• The sales assistant has all the customer order information.
• List of products that are out of stock in the store, but available
in the warehouse.
Postconditions: • A backorder is created in the system for that particular
product and their quantity.
• Inventory records are updated according to it.
• The sales assistant provides the customer with the
information about the backorder.
Normal Flow: 1. Sales assistant selects the option to create a backorder for
a specific product.
2. The system prompts the sales assistant to enter the product
details, such as the product number and the quantity to be
backordered.

5
Lab Tasks

3. The system checks the availability of the product in the


warehouse.
4. If the product is available in the warehouse, the system
creates a backorder for the specified quantity.
5. The system records the backorder according to it and
updates the inventory.
6. If the product is not available in the warehouse, the system
informs the sales assistant, and the backorder cannot be
created.
Alternative Flows If the sales assistant tries to create a backorder for a product
that is already available in the store, the system should
inform the sales assistant that the product is in stock right
now.
Exceptions: If the product selected for backordering is not available in the
warehouse, the system will throw an exception.

Use Case 3

Use Case ID: UC003

Use Case Name: Check Stock and Pricing


Actor Sales Assistant
Description: This use case describes the process to check the stock and pricing
for the items in store’s catalog.
Trigger: The customer clicks on “Check Stock and Pricing”.
Preconditions: • The sales assistant is logged into the store's point of sale
system.
Postconditions: • The stock availability and pricing information for the
requested product are displayed to the user.
Normal Flow: 1. The sales assistant or customer accesses the system's
interface for checking stock and pricing information.
2. The system prompts the user to provide the product
information such as product id.

6
Lab Tasks

3. The user enters the product id.


4. The system retrieves the data from the inventory database.
5. The system displays the stock quantity, price and tells if
the product is in stock or out of stock.
Alternative Flows If the user wants to check the stock and pricing for more
than one product, they can repeat steps 2 to 5 for each
product individually.
Exceptions: If the product information provided by the user does not match
any products in the system's database, an exception is thrown.

7
Lab Tasks

Lab 4

Q. List of possible conceptual classes:

1. Client
2. Account
3. Transaction
4. Account Statement
5. Teller
6. ATM
7. Account Type

Q. Attributes for each class:

Client:

• Client ID

• Name

• Address

• Contact Information

• Identification (for verification)

• Account List

Account:

• Account Number

• Account Type (Savings or Checking)

• Balance

• Credit Limit

• Status (Active, Closed, etc.)

• Owner (Client)

• Transaction List

8
Lab Tasks

Transaction:

• Transaction ID

• Transaction Type (Deposit, Withdrawal, Transfer, etc.)

• Amount

• Date and Time

• Account (sender/receiver)

• Description

Account Statement:

• Statement ID

• Account (associated account)

• Transaction List (list of transactions for the statement)

Teller:

• Teller ID

• Name

• Access Permissions

• Transaction History (transactions handled by the teller)

ATM:

• ATM ID

• Location

• Access Permissions

• Transaction History

Account Type:

• ID

• Name (Savings or Checking)

9
Lab Tasks

• Description

Q. Class diagram

Fig 4 Class diagram

10
Lab Tasks

Lab 5:

Class Diagram

Fig 5 Class diagram

11
Lab Tasks

Lab 6
Q. Sequence Diagram of Cash Withdrawal of ATM

Fig 1.1 Sequence Diagram of Cash


Withdrawal of ATM

12
Lab Tasks

Lab 7

Q. Activity Diagram of Cash Withdrawal of ATM

[Validation Unsuccessful]

[Validation Successful]

[Validation Unsuccessful]

[Validation Successful]

Not Enough Balance

Balance Available

Fig 1.1 Activity Diagram of Cash


Withdrawal of ATM

13
Lab Tasks

Lab 9

Make a State Machine for “ATM” system.

Figure 1 "State Machine For ATM System"

14
Lab Tasks

Lab 10
Create the Component Diagram for Given Scenario.

Figure 2 "UseCase Diagram For Customer"

15
Lab Tasks

Figure 3 "UseCase Diagram for Administrator"

16
Lab Tasks

Figure 4 Component Diagram (Online Shopping System)

17
Lab Tasks

Lab 12
Deployment Diagram

Fig 1.1 Deployment Diagram for Candy Crush

18
Lab Tasks

Lab 13
Create a Model-View Controller Design for the given scenario.
A. Model: Database Design
Student Table:
• Name: string
• Registration Number: string
• Contact Number: string
• Previous Semester GPA: float
• Previous Semester Courses: list
• Scholarship Information: string
• Degree Program: string
• Selected Courses: list of Course objects
Course Table:
• Title: string
• Instructor: string
• Venue: string
• Date and Time: DateTime
• Prerequisites: list
B. View: Interface Design
RegistrationFormView class:
show_form(): displays the registration form
CourseCatalogView class:
show_course_catalog(courses: List[Course]): displays the course catalog

C. Controller: Logic of the Application (Class Diagrams)

Controller class:
• student: Student object
• view: View object
RegistrationController class:
• fill_registration_form(): fills the registration form
• submit_registration(): submits the registration form

19
Lab Tasks

CourseCatalogController class:
• display_course_catalog(courses: List[Course]): displays the course catalog

Figure 5 " Model-View Controller Design"

Detail:

20
Lab Tasks

Figure 6 "Model-(Database Design_ERD)"

Figure 7 “Controller-(Class Diagram)”

Figure 8 "View-(Interface Design)"

21
Lab Tasks

Lab 14

22

You might also like