Upload
adelia-carter
View
223
Download
0
Embed Size (px)
Citation preview
Chapter 5 ProblemsChapter 5 Problems
TC 1,4,6,8,12TC 1,4,6,8,12
State Patrol Ticket System 1,2,3State Patrol Ticket System 1,2,3
TC 1TC 1• Review the external event checklist in Figure 5-3
and think about a university course registration system. What is an example of an event of each type in the checklist? Name each event using the guidelines for naming an external event.
• University Events:– External agent wants something requiring transaction:
Student submits registration request. – External agent wants information: Student wants to look
up open sections available– Data changed needs to be updated: Student submits
change of address information– Management wants some information: Department head
wants enrollment data for open sections.
TC 4TC 4• Consider the following sequence of actions taken
by a customer at a bank. Which action is the event the analyst should define for a bank account transaction processing system?
– (1) Kevin gets a check from grandma for his birthday – (2) Kevin wants a car – (3) Kevin decides to save his money– (4) Kevin goes to the bank– (5) Kevin waits in line – (6) Kevin makes a deposit in his savings account – (7) Kevin grabs the deposit receipt – (8) Kevin asks for a brochure on auto loans.
• Event customer makes a deposit (6)
TC 6TC 6• Draw a class diagram, including minimum and maximum multiplicity for the
following. The system stores information about two things: cars and owners. A car has attributes for make, model, and year. The owner has attributes for name and address. Assume a car must be owned by one owner and an owner can own many cars, but an owner might not own any cars (perhaps she just sold them all, but we still want a record of her in the system).
Owner
Name : StringAddress : String
Car
Make : StringModel : StringYear : Integer0..*11 0..*
TC 8TC 8• Does this model
allow a student to enroll in more than one course section at a time?
• Does the model allow a course section to contain more than one student?
• Does the model allow a student to enroll in several sections of the same course and get a grade for each enrollment?
• Does the model store information about all grades earned by all students in all sections?
TC 12TC 12
• Refer to the class diagram for a bank in Figure 5-28. Expand the model to show that there are special types of customers – personal and commercial. All customers have a name and mailing address. Commercial customers have additional attributes for credit rating, contact person, and contact person phone. Personal customers have attributes for home phone and work phone. Additionally, expand the model to show that the bank has multiple branches, and each account is serviced by one branch. Naturally, each branch has many accounts.
TC 12 RevisionsTC 12 Revisions
nameaddress
Customer
makeDepositmakeWithdrawal
accountNumberbalance
dateOpened
Account
calculateInterest
interestRate
SavingsAccount
checkStyleminBalance
CheckingAccount
1
0...*
creditRatingcontactPersoncontactPhone
CommercialCust
homePhoneworkPhone
PersonalCust
branchNumberaddressphone
Branch
1
0...*
State Patrol Ticket System 1State Patrol Ticket System 1• To what events must the ticket processing system respond?
Create a complete event table listing the event, trigger, source, use case, response, and destination for each event.
Event Trigger Source Use Case Response Destination
1. Officer submits ticket New ticket Officer Record new ticket
2. Driver sends in fine payment
Fine Payment Driver Record fine payment
3. Driver requests trial Trial request Driver Process trial request Trial data questionnaire
Ticket details
DriverCourt
4. Court sends in verdict Verdict Court Record verdict
5. Time to produce warrant request
“two weeks after fine is due (originally or after trial)”
Produce warrant request Warrant request notice
Court
State Patrol Ticket System 2State Patrol Ticket System 2• Draw a class diagram to represent the domain model for the ticket
processing system, including the attributes mentioned. Explain why it is important to understand how the system is integrated with other State Patrol systems.
licenseNumberlicenseClass
nameaddress
expirationDatedateOfBirthRestiction
DriverticketNumberdateOfTickettimeOfTicketviolationTypefineAmount
datePaidplea
trialDateverdict
Ticket
1 0..*
badgeNumbernamerank
primaryAssignmentmailingAddress
Officer
0..* 1
courtNumbername
address
Court
0..*
1
State Patrol Ticket System 3State Patrol Ticket System 3
• Draw a class diagram to extend the domain model that assumes there are different types of drivers. Classifications of types of drivers vary by state. Some states have restricted licenses for minors, for example, and special licenses for commercial vehicle operators.
licenseNumberlicenseClass
nameaddress
expirationDatedateOfBirthrestiction
Driver
ticketNumberdateOfTickettimeOfTicket
Ticket1
0..*
badgeNumbernamerank
primaryAssignmentmailingAddress
Officer
0..*
1
courtNumbername
address
Court0..*
1
beginDateeducationCode
responsibleParenttestScore
StudentDriver
maxAxelsmaxWeight
commercialCodemedExamDate
commRestriction
CommercialDriver
violationTypefineAmount
datePaid
MinorViolation
majorTypecourtDate
pleaverdict
suspensionCode
MajorViolation