0% found this document useful (0 votes)
20 views10 pages

Ics222 1

This document contains example questions and answers for an assignment on object oriented analysis and design. It includes questions about use cases, UML diagrams, and class diagrams for scenarios like an airline reservation system, library checkout system, file explorer, and the Tower of Hanoi problem.
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)
20 views10 pages

Ics222 1

This document contains example questions and answers for an assignment on object oriented analysis and design. It includes questions about use cases, UML diagrams, and class diagrams for scenarios like an airline reservation system, library checkout system, file explorer, and the Tower of Hanoi problem.
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/ 10

ICS222 - Object Oriented Analysis and Design

Assignment 2
1. Consider an online airline reservation system.
A. List two actors. Explain the relevance of each actor.
B. One use case is to make a flight reservation. List four additional use cases at
a comparable level of abstraction. Summarize the purpose of each use case
with a sentence.
C. Prepare a use case diagram for an online airline reservation system.
Answer:
A. Passenger: The primary actor who interacts with the online airline
reservation system to make flight reservations, view flight schedules, and
manage bookings.
Administrator: This actor manages the system, including updating flight
information, managing user accounts, handling customer support, and
ensuring the smooth operation of the reservation system.
B. Additional use cases:
View Flight Schedule: Allows passengers to view the schedule of available
flights, including departure times, arrival times, and available seats.
Cancel Reservation: Enables passengers to cancel their flight reservations,
potentially subject to cancellation fees or policies.
Check-in Online: Allows passengers to check-in for their flights online, select
seats, and obtain boarding passes before arriving at the airport.
Manage Booking: Allows passengers to modify their existing flight
reservations, such as changing dates, times, or destinations, and adding special
requests like meal preferences or extra baggage.
C. use case diagram:
2. Consider a software system for supporting checkout of materials at a public
library.
A. List four actors. Explain the relevance of each actor.
B. One use case is to borrow a library item. List three additional use cases at a
comparable
level of abstraction. Summarize the purpose of each use case with a sentence.
C. Prepare a use case diagram for a library checkout system.
Answer :
A. Library Member: The primary actor who interacts with the library system to
borrow, return, and renew library materials.
Librarian: This actor manages the library system, including checking in/out
items, managing the catalog, handling fines, and providing assistance to library
members.
Administrator: This actor oversees the library system, including configuring
system settings, managing user accounts, and generating reports.
Guest: A potential library member or visitor who may browse the library
catalog, but has limited access compared to registered members
B. Additional use cases:
Return Library Item: Allows library members to return borrowed items to the
library.
Renew Library Item: Enables library members to extend the loan period for
items they have borrowed.
Search Library Catalog: Allows users to search for specific items or browse the
library's collection to find materials of interest.
C. Use case diagram:

3. Identify at least 10 use cases for the Windows Explorer. Just list them
textually and summarize the purpose of each use case in one or two sentences.
Answer:
1. Navigate File System: Allows users to browse through folders and files to
locate specific items on their computer.
2. Open File: Enables users to open files, such as documents, images, or media,
using associated applications.
3. Create New Folder: Allows users to create new folders within the file system
to organize their files.
4. Copy File or Folder: Permits users to duplicate files or folders and place
them in another location within the file system.
5. Move File or Folder: Enables users to relocate files or folders from one
location to another within the file system.
6. Delete File or Folder: Allows users to remove unwanted files or folders from
the file system, sending them to the Recycle Bin.
7. Rename File or Folder: Permits users to change the name of files or folders
within the file system for better organization or clarity.
8. Search for Files or Folders: Enables users to search for specific files or
folders within the file system based on various criteria.
9. View File Properties: Allows users to access and view properties of files or
folders, such as size, type, creation date, and permissions.
10. Manage File Compression: Permits users to compress files or folders into
ZIP archives or extract files from existing archives.

4. Consider the scenario of computing a restaurant bill. There should be a


charge for eachdelivered item. The total amount should be subject to tax and a
service charge of 18% for groups of six of more. For smaller groups, there
should be a blank entry for a gratuity according to the customer’s discretion.
Any coupons or gift certificates submitted by the customer should be
subtracted. Prepare the following UML Diagrams
A. Activity diagram
B. Sequence diagram
C. Communication diagram
D. State-chart diagram
Answer:
A. Activity diagram:

B. Sequence diagram:
C. Communication diagram:
D. State-chart diagram:
5. The tower of Hanoi is a problem frequently used to teach recursive
programming techniques. The goal is to move a stack of disks from one of
three long pegs to another, using the third peg for maneuvering. Each disk is a
different size. Disks may be moved from the top of a stack on a peg to the top
of the stack on any other peg, one at a time, provided a disk is never placed on
another disk that is smaller than itself. The details of the algorithm for listing
the series of required moves depend on the structure of the class diagram
used. Prepare class diagrams for each of the following descriptions. Show
classes and associations. Do not show attributes or operations:a. A tower
consists of 3 pegs. Each peg has several disks on it, in a certain order.
b. A tower consists of 3 pegs. Disks on the pegs are organized into subsets
called stacks. Astack is an ordered set of disks. Every disk is in exactly one
stack. A peg may have severalstacks on it, in order.
c. A tower consists of 3 pegs. Disks on the pegs are organized into subsets
called stacks, as in (b), with several stacks on a peg. However, the structure of
a stack is recursive. A stack consists of one disk (the disk that is physically on
the bottom of the stack) and zero or one stack, depending on the height of the
stack.
d. Similar to (c), except only one stack is associated with a peg. Other stacks on
the peg areassociated in a linked list
Answer:
a. Tower with 3 pegs and disks:

b. Tower with pegs organized into stacks:


c. Tower with recursive stack structure:
d. Tower with linked list of stacks:

You might also like