Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
16 views16 pages

Practical Questions

The document outlines various practical exercises related to system design, including use case diagrams for an airport check-in system, ATM transactions, online catalogs, and e-commerce platforms. It also covers class diagrams for food ordering, hotel reservations, and healthcare systems, as well as activity diagrams for processes like online shopping and employee leave requests. Additionally, it includes sequence and state machine diagrams for user authentication, order processing, and ticket reservation systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views16 pages

Practical Questions

The document outlines various practical exercises related to system design, including use case diagrams for an airport check-in system, ATM transactions, online catalogs, and e-commerce platforms. It also covers class diagrams for food ordering, hotel reservations, and healthcare systems, as well as activity diagrams for processes like online shopping and employee leave requests. Additionally, it includes sequence and state machine diagrams for user authentication, order processing, and ticket reservation systems.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Practical 1: Implementation of Use Case Diagram

Question1: Consider an Airport Check-In and Security Screening System.


Business actors are Passenger, Tour Guide, Minor (Child), Passenger with Special Needs (e.g. with
disabilities), all playing external roles in relation to airport business.
Business use cases are Individual Check-In, Group Check-In (for groups of tourists), Security Screening,
etc. - representing business functions or processes taking place in airport and serving the needs of
passengers.
Business use cases Baggage Check-in and Baggage Handling extend Check-In use cases, because
passenger might have no luggage, so baggage check-in and handling are optional.

Question2: An automated teller machine (ATM) or the automatic banking machine (ABM) is a banking
subsystem (subject) that provides bank customers with access to financial transactions in a public space
without the need for a cashier, clerk, or bank teller.

Customer (actor) uses bank ATM to Check Balances of his/her bank accounts, Deposit Funds, Withdraw
Cash and/or Transfer Funds (use cases). ATM Technician provides Maintenance and Repairs. All these
use cases also involve Bank actor whether it is related to customer transactions or to the ATM servicing.
On most bank ATMs, the customer is authenticated by inserting a plastic ATM card and entering a
personal identification number (PIN). Customer Authentication use case is required for every ATM
transaction so we show it as include relationship. Including this use case as well as transaction
generalizations make the ATM Transaction an abstract use case.

Customer may need some help from the ATM. ATM Transaction use case is extended via extension
point called menu by the ATM Help use case whenever ATM Transaction is at the location specified by
the menu and the bank customer requests help, e.g. by selecting Help menu item.
ATM Technician maintains or repairs Bank ATM. Maintenance use case includes Replenishing ATM
with cash, ink or printer paper, Upgrades of hardware, firmware or software, and remote or on-site
Diagnostics. Diagnostics is also included in (shared with) Repair use case.

Question3: An Online Public Access Catalog (OPAC) is an e-Library website which is part of
Integrated Library System (ILS), also known as a Library Management System (LMS), and
managed by a library or group of libraries.
Patrons of the library can search library catalog online to locate various resources - books, periodicals,
audio and visual materials, or other items under control of the library. Patrons may reserve or renew
item, provide feedback, and manage their account.

Question4: Web Customer actor uses some web site to make purchases online. Top level use cases are
View Items, Make Purchase and Client Register. View Items use case could be used by customer as
top level use case if customer only wants to find and see some products. This use case could also be
used as a part of Make Purchase use case. Client Register use case allows customer to register on the
web site, for example to get some coupons or be invited to private sales. Note, that Checkout use case is
included use case not available by itself - checkout is part of making purchase.

View Items use case is extended by several optional use cases - customer may search for items, browse
catalog, view items recommended for him/her, add items to shopping cart or wish list. All these use
cases are extending use cases because they provide some optional functions allowing customer to find
item.
Customer Authentication use case is included in View Recommended Items and Add to Wish List
because both require the customer to be authenticated. At the same time, item could be added to the
shopping cart without user authentication.
Checkout use case also includes Payment use case which could be done either by using credit card and
external credit payment service or with PayPal.

Question5: The objective of the system is to automate all the activities of the canteen right from
purchasing and to maintaining the kitchen. The system should maintain a detailed account of all
provisions bought and food served at the canteen. Several inquiry facilities should also be provided to
view expenses incurred, planned menus/cash payment. In short following are the list of facilities which
should be provided with the system: list of items served with rates, daily menu preparation, daily
transactions, availability of information on intranet for reports and inquiries, purchases and issues.
Practical 2: Implementation of Class Diagram
Question1: Online Food Ordering System

Scenario:A user can browse through a list of restaurants and their menus on a food delivery platform.
Once the user selects a restaurant, they can choose items to add to their cart. After confirming the order,
the user makes an online payment. The restaurant receives the order and prepares it. A delivery partner
is assigned to deliver the food to the user’s address. The user can also track the order status.

●​ Classes: User, Restaurant, Menu, Cart, Order, Payment, DeliveryPartner.


●​ Relationships:
○​ A Restaurant has a Menu containing multiple Items.
○​ A User can place multiple Orders.
○​ Each Order is processed through a Payment and assigned to a DeliveryPartner.

Question2: Hotel Reservation System

Scenario:A guest can search for hotels based on location, check-in date, and check-out date. Each hotel
has multiple rooms categorized by type (e.g., Deluxe, Suite, Standard). A guest selects a room and
confirms the booking. Payments can be made online or at the hotel. The hotel staff manages bookings,
room availability, and guest check-ins and check-outs.

●​ Classes: Guest, Hotel, Room, Booking, Payment, Staff.


●​ Relationships:
○​ A Guest makes a Booking for a Room.
○​ A Hotel has multiple Rooms.
○​ Each Booking is associated with a Payment.

Question3: Learning Management System

Scenario:A platform allows students to enroll in courses offered by instructors. Each course contains
modules, assignments, and quizzes. Students can submit assignments and take quizzes, which are
evaluated by the instructor. Instructors can track the performance of enrolled students. Administrators
manage course creation and platform settings.
●​ Classes: Student, Instructor, Course, Module, Assignment, Quiz, Admin.
●​ Relationships:
○​ A Student enrolls in multiple Courses.
○​ Each Course is created by an Instructor and contains Modules.
○​ A Module includes multiple Assignments and Quizzes.

Question4: Airline Reservation System

Scenario:A passenger searches for flights based on origin, destination, and travel date. Once a suitable
flight is found, the passenger books a ticket and makes a payment. Each booking is assigned a unique
reference number. Airline staff manage the flight schedule, passenger lists, and cancellations.

●​ Classes: Passenger, Flight, Booking, Ticket, Payment, Staff.


●​ Relationships:
○​ A Passenger can make multiple Bookings.
○​ A Booking is linked to a Flight and generates a Ticket.
○​ Each Booking involves a Payment.

Question5: Healthcare System

Scenario:Patients register on a hospital's portal to book appointments with doctors. Each doctor
specializes in a specific field and is available during particular hours. After the consultation, the doctor
prescribes medication or diagnostic tests. The patient can view the prescriptions and test results through
the portal. Billing is generated based on the consultation and tests.

●​ Classes: Patient, Doctor, Appointment, Prescription, Test, Billing.


●​ Relationships:
○​ A Patient can book multiple Appointments with a Doctor.
○​ An Appointment may result in a Prescription or Test.
○​ A Billing entry is generated for every Appointment.
Practical 3: Implementation of Object Diagram
Question1: Online Food Ordering System
Question2: Hotel Reservation System
Question3: Learning Management System
Question4: Airline Reservation System
Question5: Healthcare System

Practical 4: Implementation of Activity Diagram


Question1: Online Shopping Process
Scenario: A customer logs into an online shopping platform, searches for a product, adds it to the cart,
and proceeds to checkout. The system processes the payment, and the order is confirmed. Create an
activity diagram for this process, showing the various activities and decision points.

Question2: Employee Leave Request​


Scenario: An employee requests leave through an HR management system. The request is sent for
approval. If approved, the leave is recorded in the system; otherwise, the request is denied. Draw an
activity diagram for the employee leave request process.

Question3: Library Book Borrowing


Scenario: A student borrows a book from the library. They search for the book, check its availability,
borrow it if available, and return it by the due date. If the book is not available, they are prompted to
wait until it becomes available. Create an activity diagram for the library book borrowing process.

Question4:E-Learning Course Enrollment


Scenario: A student enrolls in an e-learning course, selects the course, and makes the payment. After
payment, the student gets access to the course materials. Draw an activity diagram to depict the
e-learning enrollment process.
Question5: Order Delivery System
Scenario: A customer places an order on an e-commerce website, which is processed by the warehouse
for packaging. The order is handed over to a delivery partner, and the customer receives the order. If the
delivery fails, the order is rescheduled for delivery. Create an activity diagram illustrating this process.

Practical 5: Implementation of Sequence Diagram


Question1: User Authentication
Scenario: A user logs into an online banking system. The system verifies the username and password,
checks if the account is active, and provides access to the dashboard. If the login fails, the user is
prompted to re-enter the credentials. Create a sequence diagram to show the interactions between the
user, the banking system, and the authentication service.

Question2: Flight Booking Process


Scenario: A customer searches for available flights, selects a flight, and enters payment details. The
system processes the payment and confirms the booking. If the payment fails, the user is asked to try
again. Design a sequence diagram to represent the interactions between the customer, the flight booking
system, and the payment gateway.

Question3: Order Cancellation in E-commerce


Scenario: A customer requests to cancel an order that is already processed. The system checks if the
order has been shipped, processes the cancellation request, and updates the order status. If the order has
already been shipped, the system informs the customer. Create a sequence diagram to illustrate this
process, including interactions between the customer, the e-commerce system, and the shipping service.

Question4: Hotel Check-In Process


Scenario: A guest arrives at a hotel, and the hotel system verifies the booking details. The system checks
for room availability, processes the check-in, and provides the guest with the room key. If the booking
details are invalid, the guest is informed and asked to provide correct information. Create a sequence
diagram that outlines this process.
Question5:Online Ticket Booking
Scenario: A user searches for available movie tickets, selects a showtime, and completes the booking
process. The system processes the payment, confirms the booking, and sends a ticket to the user. If the
payment fails, the user is asked to retry. Create a sequence diagram to represent the interactions between
the user, the movie booking system, and the payment gateway.

Practical 6: Implementation of State Machine Diagram


Question1: Ticket Reservation System
Scenario: A ticket reservation system for an event could have states like "Available," "Reserved,"
"Confirmed," and "Cancelled." The system transitions between these states based on user actions like
selecting a ticket, confirming payment, and possibly canceling the reservation. Draw a state machine
diagram to represent these transitions.

Question2: Elevator System


Scenario: An elevator system has several states such as "Idle," "Moving Up," "Moving Down," "Door
Opening," and "Door Closing." The elevator transitions between these states based on user input (e.g.,
pressing floor buttons) and events (e.g., doors closing or the elevator reaching a floor). Create a state
machine diagram to model the states and transitions of the elevator.

Question3: Online Order Processing


Scenario: A customer places an order on an e-commerce website. The order can go through various
states: "Order Placed," "Payment Pending," "Payment Confirmed," "Shipped," "Delivered," and
"Completed." The system should handle state transitions depending on payment success, shipment
status, and delivery confirmation. Draw a state machine diagram for the online order processing system.

Question4: ATM Transaction


Scenario: An ATM system follows states like "Idle," "Card Inserted," "PIN Entered," "Transaction
Selection," "Processing," and "Transaction Completed." The machine may also transition to
"Transaction Error" or "Out of Service" states based on user actions or system errors. Create a state
machine diagram for the ATM transaction process.
Question5: User Account Status in a Social Media Platform
Scenario: A user account can be in various states such as "Active," "Inactive," "Suspended," or
"Banned." These transitions happen due to actions like logging in, being reported for violating
community guidelines, or manual suspension. Design a state machine diagram to show the possible
states and transitions for a user account.

Practical 7: Implementation of Collaboration Diagram

Practical 8: Implementation of Component Diagram


Practice Questions

1.​ A student can search for books, borrow or reserve books, and return them. A librarian manages
book inventory, issues books, and checks overdue returns. Design a use case diagram illustrating
these interactions.

2.​ Patients book appointments, consult doctors, and make payments. Doctors can view patient
records and update treatment details. Admin staff manage appointments and billing. Create a use
case diagram showing the relationships between patients, doctors, and admin staff.

3.​ Riders can book rides, view estimated fares, and rate drivers. Drivers accept ride requests, view
rider details, and complete trips. Admins monitor ride statistics and resolve complaints. Create a
use case diagram for the ride-sharing application.

4.​ A user logs into an online shopping website, searches for a product, adds it to the cart, proceeds
to checkout, and completes the payment. Create an activity diagram that models this process,
ensuring the inclusion of decision points for login success or failure and stock availability of the
selected product.

5.​ A student registers for a university course through an online portal. The system validates the
student's eligibility and either confirms registration or displays an error. Design an activity
diagram to represent this process, indicating actions like filling out the form, validation, and
error handling.
6.​ Draw an activity diagram for the following scenario: A customer uses an online food delivery
app to place an order. The customer starts by logging into the app. If the login is successful, the
customer searches for a restaurant or specific dishes. After selecting the desired items, the
customer adds them to the cart and proceeds to checkout. At checkout, the system verifies if the
selected items are available. If any item is unavailable, the system suggests alternatives. Once the
availability is confirmed, the customer enters delivery details and chooses a payment method.
Payment can be made via card, wallet, or cash on delivery. If payment is successful, the system
confirms the order and sends a notification to the restaurant and the delivery partner. If payment
fails, the customer is asked to retry or select a different payment method. The process concludes
with the order being delivered to the customer.
7.​ Draw an activity diagram for the following scenario: A user wants to book a flight ticket through
an airline's website. The process begins with the user entering the travel details, such as
departure and destination cities, travel dates, and number of passengers. The system searches for
available flights based on the input and displays a list of options. The user selects a flight and
proceeds to enter passenger details. The system validates the information and calculates the total
cost. If the user has a discount code, it is applied at this stage. The user then chooses a payment
method and completes the transaction. Upon successful payment, the system generates a ticket
and sends it to the user's email. If the payment fails, the user is prompted to retry. The process
ends when the ticket is successfully issued.
8.​ Draw an activity diagram for the following scenario: A student visits the library to borrow a
book. The process begins with the librarian verifying the student's library membership. If the
membership is valid, the student requests a book. The librarian checks the availability of the
book in the inventory. If the book is available, it is issued to the student, and the due date is
recorded in the system. If the book is not available, the student can choose to reserve it. For
overdue books, the system calculates a fine, which the student must pay before borrowing new
books. The process concludes with either the book being issued or the reservation being
confirmed.
9.​ Draw an activity diagram for the following scenario: A patient wants to schedule an
appointment with a doctor at a hospital. The process begins with the patient providing personal
details and selecting a department or a specific doctor. The system checks the doctor's
availability on the requested date and time. If the slot is available, the system confirms the
booking and sends an appointment confirmation via SMS or email. If the slot is unavailable, the
system suggests alternate dates or times, and the patient can select one of the suggested options.
Once the appointment is booked, the patient is asked to confirm payment for consultation, which
can be done online or at the hospital. The process ends when the appointment and payment are
successfully completed.
10.​Draw an activity diagram for the following scenario: A student logs into an online examination
portal to take an exam. The system first verifies the student's credentials. Once authenticated, the
student selects the available exam from the dashboard. Before starting the exam, the system
displays instructions, and the student must agree to the terms and conditions. The exam begins,
and the student answers the questions within the allotted time. The system saves the answers as
the student progresses. If the student submits the exam before time runs out, the system
calculates the score and displays the results instantly. If time runs out, the exam is automatically
submitted, and the results are processed. The system then logs the student's performance in its
database, and the process ends.
11.​Draw an activity diagram for the following scenario: A customer visits an online hotel booking
platform to make a reservation. The customer begins by searching for hotels based on location,
check-in and check-out dates, and the number of guests. The system displays a list of available
hotels and rooms. The customer selects a hotel and room type, then proceeds to enter personal
details and confirm the reservation. The system calculates the total cost and requests payment. If
payment is successful, the reservation is confirmed, and a confirmation email is sent to the
customer. If payment fails, the customer is prompted to retry or select a different payment
method. The process concludes when the booking is either confirmed or canceled by the user.
12.​Draw an activity diagram for the following scenario:A customer initiates a return request for a
product purchased online. The system first checks if the return request is within the allowed
return period. If eligible, the system verifies the product's condition based on the customer’s
input or uploaded images. If the product qualifies for a return, the system arranges a pickup and
notifies the customer. Once the product is received and inspected by the warehouse, the refund is
processed. If the product fails the inspection, the customer is informed, and the return is rejected.
The process ends when the refund is issued or the product is returned to the customer.
13.​Draw an activity diagram for the following scenario:A user applies for a loan through an online
banking portal. The user starts by filling out an application form with personal, employment, and
financial details. The system validates the input and performs a credit check. If the user meets the
eligibility criteria, the application is approved, and a loan offer is generated. The user reviews
and accepts the offer, after which the loan amount is disbursed to the user’s account. If the credit
check fails or the user does not meet the criteria, the application is rejected. Notifications are sent
to the user at each stage of the process.
14.​Draw an activity diagram for the following scenario:A new employee joins a company and goes
through an onboarding process. It starts with the employee submitting required documents. HR
verifies the documents and creates an employee profile in the system. Next, the employee attends
an orientation session and completes mandatory training. After the training, the employee is
introduced to their team and given access to tools and resources. The process ends with a
feedback session where the employee shares their onboarding experience.
15.​Draw an activity diagram for the following scenario:A user manages their subscription to an
online service. The process begins when the user logs in and navigates to the subscription
settings. The user can choose to renew, upgrade, downgrade, or cancel the subscription. If
renewing or upgrading, the system processes payment and updates the subscription details. If the
user cancels, the system confirms the cancellation and schedules the termination date.
Notifications are sent to the user based on their actions. The process ends with the user logging
out.
16.​Draw an activity diagram for the following scenario:A student applies for admission to a
university. The process begins with the student filling out the application form and submitting
the required documents. The university reviews the application and schedules an interview if
necessary. After the interview, the admission committee makes a decision. If admitted, the
student receives an offer letter and proceeds to pay the fees to confirm admission. If rejected, the
student is notified, and the process ends.
17.​Draw an activity diagram for the following scenario:A user books tickets for a live event. The
process starts with the user searching for the event and selecting a date and seat category. The
system displays seat availability and calculates the total cost. The user confirms the selection and
makes a payment. If the payment is successful, tickets are generated and emailed to the user. If
payment fails, the user is prompted to retry or cancel the booking. The process ends when the
tickets are issued or the booking is canceled.
18.​Draw an Use-case diagram : The online shopping system allows customers to browse products,
add items to their cart, and place orders. The system includes use cases for user registration,
login, searching for products, viewing product details, and managing the shopping cart. Once an
order is placed, the system supports payment processing, order confirmation, and shipment
tracking. Administrators manage product inventory, update prices, and handle customer queries.
External actors include customers, administrators, and payment gateways.
19.​Draw a use case diagram for the following scenario:A library management system is used by
librarians, students, and teachers. Students and teachers can search for books, borrow books, and
return them. Librarians can manage book inventory, add new books, and generate overdue fine
reports. Use cases include "Search Books," "Borrow Book," "Return Book," "Add Book,"
"Generate Fine Report," and "Update Inventory." Actors are "Librarian," "Student," and
"Teacher."
20.​Draw a use case diagram for the following scenario:An online examination system is used by
students, instructors, and administrators. Students can register for exams, take exams, and view
results. Instructors can create question papers, grade exams, and upload results. Administrators
manage user accounts, schedule exams, and generate reports. Use cases include "Register for
Exam," "Take Exam," "View Results," "Create Question Paper," "Grade Exam," "Schedule
Exam," and "Generate Reports." Actors are "Student," "Instructor," and "Administrator."
21.​Draw a use case diagram for the following scenario:A hospital management system involves
patients, doctors, receptionists, and pharmacists. Patients can book appointments, view
prescriptions, and pay bills. Doctors can manage appointments, write prescriptions, and update
patient records. Receptionists handle appointment scheduling and patient registration.
Pharmacists dispense prescribed medicines. Use cases include "Book Appointment," "View
Prescription," "Manage Appointment," "Write Prescription," "Update Patient Records," and
"Dispense Medicine." Actors are "Patient," "Doctor," "Receptionist," and "Pharmacist."
22.​Draw a use case diagram for the following scenario:A food delivery app connects customers,
delivery personnel, and restaurant managers. Customers can browse menus, place orders, track
deliveries, and provide feedback. Delivery personnel can view assigned orders, pick them up,
and mark them as delivered. Restaurant managers update menus, confirm orders, and manage
delivery statuses. Use cases include "Browse Menu," "Place Order," "Track Delivery," "Provide
Feedback," "Confirm Order," "Update Menu," and "Deliver Order." Actors are "Customer,"
"Delivery Personnel," and "Restaurant Manager."
23.​Draw a use case diagram for the following scenario:A university admission system involves
applicants, admissions officers, and finance officers. Applicants can fill out application forms,
upload documents, and check application statuses. Admissions officers evaluate applications and
communicate decisions. Finance officers process tuition fee payments. Use cases include
"Submit Application," "Upload Documents," "Check Application Status," "Evaluate
Application," "Communicate Decision," and "Process Fee Payment." Actors are "Applicant,"
"Admissions Officer," and "Finance Officer."
24.​Draw a use case diagram for the following scenario:A movie ticket booking system is used by
customers, administrators, and payment gateways. Customers can search for movies, book
tickets, and view bookings. Administrators manage movie schedules, add new movies, and
monitor bookings. Payment gateways handle transaction processing. Use cases include "Search
Movie," "Book Ticket," "View Booking," "Manage Schedule," "Add Movie," and "Process
Payment." Actors are "Customer," "Administrator," and "Payment Gateway."
25.​Draw a use case diagram for the following scenario:A banking system involves customers, bank
tellers, and administrators. Customers can check balances, transfer money, and apply for loans.
Bank tellers assist customers with deposits and withdrawals. Administrators oversee customer
accounts and manage loan approvals. Use cases include "Check Balance," "Transfer Money,"
"Apply for Loan," "Deposit Money," "Withdraw Money," and "Approve Loan." Actors are
"Customer," "Bank Teller," and "Administrator."
26.​Draw a use case diagram for the following scenario:A travel booking system involves users,
travel agents, and payment gateways. Users can search for flights, book tickets, and cancel
bookings. Travel agents assist with booking and handle itinerary modifications. Payment
gateways process transactions. Use cases include "Search Flights," "Book Ticket," "Cancel
Booking," "Modify Itinerary," and "Process Payment." Actors are "User," "Travel Agent," and
"Payment Gateway."
27.​Draw a use case diagram for the following scenario:A car rental system involves customers,
rental agents, and administrators. Customers can browse available cars, make reservations, and
cancel bookings. Rental agents manage car availability, issue cars, and handle returns.
Administrators oversee the entire system and generate reports. Use cases include "Browse Cars,"
"Reserve Car," "Cancel Reservation," "Issue Car," "Return Car," "Manage Availability," and
"Generate Reports." Actors are "Customer," "Rental Agent," and "Administrator."
28.​Draw a use case diagram for the following scenario:A job portal is used by job seekers,
employers, and administrators. Job seekers can create profiles, upload resumes, search for jobs,
and apply. Employers can post job openings, review applications, and shortlist candidates.
Administrators monitor the platform, manage user accounts, and handle complaints. Use cases
include "Create Profile," "Upload Resume," "Search Jobs," "Apply for Job," "Post Job," "Review
Application," "Shortlist Candidate," and "Handle Complaints." Actors are "Job Seeker,"
"Employer," and "Administrator."
29.​Draw a use case diagram for the following scenario:A parking management system includes
drivers, parking attendants, and administrators. Drivers can search for parking spots, book them,
and pay for parking. Parking attendants assist drivers with parking and monitor spaces.
Administrators manage parking records and generate usage reports. Use cases include "Search
Parking Spot," "Book Spot," "Pay for Parking," "Monitor Parking," and "Generate Reports."
Actors are "Driver," "Parking Attendant," and "Administrator."
30.​Draw a use case diagram for the following scenario:A social media platform involves users,
moderators, and administrators. Users can create accounts, post content, comment on posts, and
send messages. Moderators review flagged content and manage community guidelines.
Administrators oversee the platform, ban users, and generate analytics. Use cases include "Create
Account," "Post Content," "Comment on Post," "Send Message," "Review Content," "Manage
Guidelines," and "Generate Analytics." Actors are "User," "Moderator," and "Administrator."
31.​Draw a sequence diagram for the following scenario: A customer adds items to their cart and
proceeds to checkout. The system verifies item availability, calculates the total amount, and
prompts the customer for payment. The customer selects a payment method and enters details.
The payment gateway processes the transaction. If successful, the order is confirmed, and a
confirmation email is sent. If the payment fails, the customer is prompted to retry. Objects are:
Customer, Shopping System, Inventory System, Payment Gateway, Email Service.
32.​Draw a sequence diagram for the following scenario: A customer inserts their ATM card and
enters a PIN. The ATM verifies the PIN with the bank server. If incorrect, the system displays an
error and prompts for re-entry. If correct, the customer selects withdrawal, enters the amount, and
the ATM checks the account balance. If sufficient funds are available, the transaction is
approved, cash is dispensed, and the account balance is updated. A receipt is printed. Objects
are: Customer, ATM Machine, Bank Server.
33.​Draw a sequence diagram for the following scenario: A user searches for a flight by entering the
departure and destination cities along with travel dates. The system retrieves available flights.
The user selects a flight, enters passenger details, and makes a payment. The system processes
the payment and issues an e-ticket. The confirmation is sent via email. Objects are: User, Flight
Booking System, Payment Gateway, Email Service.
34.​Draw a sequence diagram for the following scenario: A guest selects a hotel and enters
check-in/check-out dates. The system checks room availability. If available, the guest enters
personal details and selects a payment method. The system processes the payment and confirms
the booking. The hotel is notified, and a confirmation email is sent to the guest. Objects are:
Guest, Hotel Reservation System, Payment Gateway, Email Service, Hotel Database.
35.​Draw a sequence diagram for the following scenario: A customer selects a restaurant, browses
the menu, and adds food items to the cart. The system calculates the total cost. The customer
enters the delivery address and makes a payment. The restaurant receives the order, prepares the
food, and updates the status. A delivery partner picks up the order and delivers it. The customer
receives a notification when the food is delivered. Objects are: Customer, Food Ordering System,
Restaurant, Delivery Partner, Payment Gateway.
36.​Draw a sequence diagram for the following scenario: A guest selects a hotel and enters
check-in/check-out dates. The system checks room availability. If available, the guest enters
personal details and selects a payment method. The system processes the payment and confirms
the booking. The hotel is notified, and a confirmation email is sent to the guest. Objects are:
Guest, Hotel Reservation System, Payment Gateway, Email Service, Hotel Database.
37.​Draw a sequence diagram for the following scenario: A customer selects a restaurant, browses
the menu, and adds food items to the cart. The system calculates the total cost. The customer
enters the delivery address and makes a payment. The restaurant receives the order, prepares the
food, and updates the status. A delivery partner picks up the order and delivers it. The customer
receives a notification when the food is delivered. Objects are: Customer, Food Ordering System,
Restaurant, Delivery Partner, Payment Gateway.
38.​Draw a sequence diagram for the following scenario: A student logs into the library system and
searches for a book. If available, they request to borrow it. The system verifies the student's
eligibility (e.g., no pending fines). If eligible, the book is issued, and the due date is recorded. If
the book is unavailable, the student can place a reservation. Objects are: Student, Library
System, Inventory Database.
39.​Draw a sequence diagram for the following scenario: A user enters a username and password to
log into a website. The system validates the credentials against the database. If correct, access is
granted, and the user is redirected to the homepage. If incorrect, an error message is displayed,
and the user is prompted to retry. Objects are: User, Authentication System, Database.
40.​Draw a sequence diagram for the following scenario: A passenger searches for train availability
by entering journey details. The system fetches available trains. The passenger selects a train,
provides details, and makes a payment. If successful, the ticket is generated, and a confirmation
email is sent. If payment fails, the passenger can retry. Objects are: Passenger, Railway Booking
System, Payment Gateway, Email Service.
41.​Draw a sequence diagram for the following scenario: A student selects a course and enrolls. The
system verifies prerequisites (if any). If eligible, the student proceeds to make a payment. After
successful payment, access to course materials is granted. A confirmation email is sent to the
student. Objects are : Student, Course Management System, Payment Gateway, Email Service.
42.​Draw a sequence diagram for the following scenario: A student fills out an online application
form and submits required documents. The system validates the details and forwards them for
review. The admission officer evaluates the application and either approves or rejects it. If
approved, the student is notified and asked to pay the enrollment fee. After payment, the student
is officially enrolled. Objects are: Student, Admission System, Admission Officer, Payment
Gateway, Notification Service.
43.​Draw a state machine diagram for the following scenario: An ATM starts in the Idle state. When
a user inserts a card, it transitions to Card Inserted. If the card is valid, it moves to PIN
Verification. If the PIN is correct, the user selects Withdraw Cash. The system verifies the
balance. If funds are available, it moves to Dispensing Cash, then Transaction Complete, and
returns to Idle. If funds are insufficient, it transitions to Insufficient Balance before returning to
Idle. If an invalid PIN is entered three times, it moves to Card Blocked.
44.​Draw a state machine diagram for the following scenario: An online order starts in the Order
Placed state. If payment is successful, it moves to Payment Confirmed. The order then transitions
to Processing and then Shipped. If the customer cancels before shipping, it moves to Order
Canceled. If the order is delivered, it transitions to Order Completed. If returned, it moves to
Returned.
45.​Draw a state machine diagram for the following scenario: A user starts in the Logged Out state.
After entering credentials, the system transitions to Authenticating. If successful, it moves to
Logged In. If authentication fails three times, it transitions to Account Locked. When the user
logs out, it returns to Logged Out.
46.​Draw a state machine diagram for the following scenario: A hotel room starts in the Available
state. When a guest requests a booking, it transitions to Reserved. If payment is made, it moves
to Booked. Upon check-in, it transitions to Occupied. After check-out, it moves to Cleaning, then
back to Available. If a reservation is canceled, it returns to Available.
47.​Draw a state machine diagram for the following scenario: A hotel room starts in the Available
state. When a guest requests a booking, it transitions to Reserved. If payment is made, it moves
to Booked. Upon check-in, it transitions to Occupied. After check-out, it moves to Cleaning, then
back to Available. If a reservation is canceled, it returns to Available.
48.​Draw a state machine diagram for the following scenario: A flight booking begins in Available.
When a passenger selects a flight, it moves to Reserved. If payment is completed, it transitions to
Confirmed. Before departure, the passenger can cancel, moving to Canceled. On the day of the
flight, it transitions to Boarding, then In-Flight, and finally Landed.
49.​Draw a state machine diagram for the following scenario: An elevator starts in Idle. When a
request is made, it transitions to Moving Up or Moving Down. When it reaches the desired floor,
it moves to Door Opening. After passengers enter/exit, it transitions to Door Closing. If
overloaded, it moves to Overload Warning. Otherwise, it returns to Idle.
50.​Draw a state machine diagram for the following scenario: A product starts in Delivered. If the
customer initiates a return, it moves to Return Requested. If approved, it transitions to Return
Approved and then Shipped Back. Upon inspection, it moves to Refund Processed. If the return
is rejected, it moves to Return Denied.
51.​Draw a state machine diagram for the following scenario: A book starts in the Available state.
When borrowed, it transitions to Checked Out. If returned on time, it moves back to Available. If
overdue, it moves to Overdue. If the fine is paid, it transitions to Fine Paid and then back to
Available. If lost, it moves to Lost.
52.​Draw a state machine diagram for the following scenario: A food order starts in Order Placed. If
payment is confirmed, it transitions to Processing. Once prepared, it moves to Out for Delivery.
If delivered, it transitions to Completed. If cancelled before delivery, it moves to Cancelled.
53.​Draw a sequence diagram for the following scenario: A user selects a movie, chooses a theater,
date, and seat. The system verifies seat availability. If seats are available, the user proceeds to
payment. Upon successful payment, the booking is confirmed, and an e-ticket is generated. The
user receives a confirmation email. If payment fails, the user is prompted to retry. Objects are:
User, Movie Ticket System, Payment Gateway, Email Service.

You might also like