0% found this document useful (0 votes)
13 views5 pages

CH 5 Ans

The document discusses the implications of defining system boundaries and context models on project complexity and cost, providing examples from e-commerce payment integration and smart-home systems. It outlines processes for planning large-scale events, interactions in a Mentcare system, course registration at a university, and modeling email systems. Additionally, it includes activity and sequence diagrams for ATM cash withdrawal, state diagrams for an automatic washing machine, DVD player, and mobile camera, emphasizing the importance of both activity and sequence diagrams in system modeling.

Uploaded by

yussefgutzbch
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)
13 views5 pages

CH 5 Ans

The document discusses the implications of defining system boundaries and context models on project complexity and cost, providing examples from e-commerce payment integration and smart-home systems. It outlines processes for planning large-scale events, interactions in a Mentcare system, course registration at a university, and modeling email systems. Additionally, it includes activity and sequence diagrams for ATM cash withdrawal, state diagrams for an automatic washing machine, DVD player, and mobile camera, emphasizing the importance of both activity and sequence diagrams in system modeling.

Uploaded by

yussefgutzbch
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/ 5

• 5.2.

The way in which a system boundary is defined, and an appropriate context model is
created may have serious implications on the complexity and cost of a project. Give two
examples where this may be applicable.
Answer:

1. E-commerce payment integration: Placing the payment gateway outside the


system boundary means you must build and maintain secure, robust APIs to
interact with it, adding integration and testing overhead. Including it inside the
boundary forces the team to handle compliance and security internally, greatly
expanding scope and ongoing maintenance effort.

2. Smart-home control system: Treating each IoT device as external requires custom
adapters for different vendor protocols, increasing development complexity.
Encompassing device firmware updates and certification within the boundary
balloons the project’s scale and support costs.

• 5.3. You have been asked to develop a system that will help with planning large-scale
events and parties such as weddings, graduation celebrations, and birthday parties. Using
an activity diagram, model the process context for such a system that shows the activities
involved in planning a party (booking a venue, organizing invitations, etc.) and the system
elements that might be used at each stage.
Answer:

1. Define Event: User enters event details → EventProfile module logs data.

2. Select & Book Venue: VenueBookingService checks availability and confirms


reservation.

3. Manage Guest List: InvitationManager compiles guests → NotificationEngine sends


invites.

4. Track RSVPs: RSVPTracker updates guest statuses → ReminderModule follows up.

5. Arrange Services: CateringScheduler, DecorPlanner, EntertainmentCoordinator


coordinate bookings.

6. Finalize Schedule: TimelineGenerator produces the final agenda.


• 5.4. For the Mentcare system, propose a set of use cases that illustrates the interactions
between a doctor, who sees patients and prescribes medicine and treatments, and the
Mentcare system.
Answer:

o Schedule Appointment: Doctor views available slots and books a patient visit
through Mentcare.

o View Patient Record: Doctor retrieves and reviews medical history and test
results.

o Prescribe Treatment: Doctor selects medications; Mentcare checks allergies


and drug conflicts before generating a prescription.

o Send Prescription to Pharmacy: System transmits prescription details


electronically and confirms receipt.

o Generate Follow-Up Reminder: Mentcare schedules and sends automated


reminders for future check-ups.

• 5.5. Develop a sequence diagram showing the interactions involved when a student
registers for a course in a university. Courses may have limited enrollment, so the
registration process must include checks that places are available. Assume that the
student accesses an electronic course catalog to find out about available courses.
Answer:

1. Student → CourseCatalog: listAvailableCourses() → Catalog returns course list.

2. Student → RegistrationController: register(studentID, courseID) → Controller calls


checkSeats(courseID) on EnrollmentDB.

3. EnrollmentDB → RegistrationController: Returns seat availability → if seats


available, enroll(studentID, courseID) and return confirmation; otherwise return
“full” status.

4. RegistrationController → Student: Displays “Registration Confirmed” or “Course


Full.”
• 5.6. Look carefully at how messages and mailboxes are represented in the email system
that you use. Model the object classes that might be used in the system implementation
to represent a mailbox and an email message.
Answer:
Class Mailbox

o Attributes: ownerID, folders (list of Folder), messages (list of EmailMessage)

o Operations: addMessage(msg), deleteMessage(msgID), moveMessage(msgID,


folderName)
Class EmailMessage

o Attributes: messageID, sender, recipients (list), subject, body, timestamp,


status (read/unread)

o Operations: markAsRead(), forward(toList), reply(replyBody)


• 5.7. Based on your experience with a bank ATM, draw an activity diagram that models the
data processing involved when a customer withdraws cash from the machine.
Answer:

1. Insert Card → validateCard() → decision: valid?

2. If valid → Enter PIN → validatePIN() → decision: correct?

3. If correct → Select Withdrawal → Enter Amount → Check Funds → decision:


sufficient?

4. If sufficient → Dispense Cash → Print Receipt → Eject Card → End; if any check fails
→ Display Error → Eject Card → End

• 5.8. Draw a sequence diagram for the same system. Explain why you might want to
develop both activity and sequence diagrams when modeling the behavior of a system.
Answer:
Sequence of messages:

1. CustomerUI → ATMController: insertCard()

2. ATMController → BankServer: validateCard() → response → CustomerUI: prompt for


PIN

3. CustomerUI → ATMController: enterPIN() → ATMController → BankServer: verifyPIN()


→ response

4. CustomerUI → ATMController: requestWithdrawal(amount) → ATMController →


BankServer: authorize(amount) → response → ATMController: dispenseCash() →
CustomerUI: printReceipt() → ATMController: ejectCard().
Why both? Activity diagrams map the end-to-end workflow and decision logic,
while sequence diagrams detail precise message exchanges and timing between
system components. Using both ensures clarity at both the process and
interaction levels.
• 5.9. Draw state diagrams of the control software for:

o An automatic washing machine that has different programs for different types
of clothes.

o The software for a DVD player.

o The control software for the camera on your mobile phone. Ignore the flash if
you have one on your phone.

Washing Machine States:

Idle → SelectProgram → FillWater → Wash → Rinse → Spin → Drain → Completed → Idle

(Transitions driven by program selection, water sensors, and timers.)


DVD Player States:

Stopped ↔ Playing ↔ Paused

↓ ↖ Eject

Eject

(Commands: play, pause, stop, eject.)


Mobile Camera States:

Idle → Focus → Capture → Review → {Save → Idle | Retake → Capture}

(Transitions on autofocus lock, shutter press, and user choice.)

You might also like