Systems Analysis and Design in a Changing World, Fourth Edition -Solutions 05

Share Embed Donate


Short Description

Systems Analysis and Design in a Changing World, Fourth Edition -Solutions 05...

Description

Systems Analysis and Design in a Changing World, Fourth Edition

5-1

Chapter 5 – Modeling System Requirements Solutions to End-of-Chapter Material Review Questions 1.

What are some of the reasons for creating models during system development? See the list in Figure 5-2 on page 152.

2.

What are three types of models? Mathematical models, descriptive models, and graphical models.

3.

What are the two key concepts used to begin defining system requirements? Events the system needs to respond to and things that the system needs to store information about.

4.

What is an event? An event is an occurrence at a specific time and place that can be described and is worth remembering by the system.

5.

What are the three types of events? External events, temporal events, and state events.

6.

Which type of event results in data entering the system? External event.

7.

Which type of event occurs at a defined point in time? Temporal event.

8.

Which type of event does not result in data entering the system but always results in an output? Temporal event.

9.

What type of event would be named Employee quits job? An external event because the data entering the system would be data about the termination of the employee (who, when, and why).

Systems Analysis and Design in a Changing World, Fourth Edition

10.

5-2

What type of event would be named Time to produce paychecks? A temporal event because the system knows it is time to produce paychecks at the end of the month.

11.

What are some examples of system controls? Validating user input, requiring user IDs and passwords for logging on to the system, backing up data regularly, encrypting data that is transmitted, and so on.

12.

What does the perfect technology assumption state? The perfect technology assumption states that events should be included during analysis only if the system would be required to respond under perfect conditions—that is, with equipment never breaking down, capacity for processing and storage being unlimited, and people operating the system being completely honest and never making mistakes. Basically, the perfect technology assumption prevents analysts from worrying about systems controls until later during the design phase.

13.

What are the columns in an event table? Event, trigger, source, activity/use case, response, and destination.

14.

What is a trigger? A source? An activity or use case? A response? A destination? See margin definitions. A trigger is a data input for an external event and a definition of a point of time for a temporal event. A source is what external agent or actor supplies the data input for an external event. The activity/use case is what the system does when the event occurs (the process). A response is a data output from the system. The destination is the external agent or actor that receives the data output.

15.

What is a “thing” called in models used in the traditional approach? A data entity.

16.

What is a “thing” called in the object-oriented approach? An object.

17.

What is a relationship? A naturally occurring association among specific things, such as an order is placed by a customer, and an employee works in a department.

Systems Analysis and Design in a Changing World, Fourth Edition

18.

5-3

What is cardinality of a relationship (also called multiplicity)? The number of associations that occur between specific things, such as a customer places many orders, and an employee works in one department.

19.

Describe how an entity-relationship diagram shows the minimum and maximum cardinality. A circle on the relationship line means zero, and a short slash line means one. A “crow’s feet” symbol means many.

20.

What are unary, binary, and n-ary relationships? A unary relationship is a relationship between two things of the same type; a binary relationship is a relationship between two things of different types; and an n-ary relationship is a relationship among n things or n different types.

21.

What are attributes and compound attributes? An attribute is one piece of specific information about a thing, such as the first name of a person. A compound attribute is made up of more than one specific piece of information. For example a Full name compound attribute could represent the first, middle, and last names of a person.

22.

What is an associative entity? An associative entity is a data entity that represents a many-to-many relationship between two entities when the relationship includes information needing to be stored.

23.

What are the symbols shown on an entity-relationship diagram? Rectangle for entity, line for relationship, minimum and maximum cardinality symbols including a “crow’s feet” symbol are shown on the line of a relationship.

24.

What are the symbols shown on a class diagram? A rectangle with three sections inside for class, a line with a triangle for generalization/ specialization (inheritance), a line with a diamond for aggregation (whole part), and a line with multiplicity written on it for association relationships.

25.

What is encapsulated along with the values of attributes in an object? Methods of the class (what each object knows how to do) are combined with the attributes of objects of the class.

Systems Analysis and Design in a Changing World, Fourth Edition

26.

5-4

What is a generalization/specialization hierarchy? A hierarchy that structures or ranks classes from the more general superclass to the more specialized subclasses. In OO, the attributes and methods (plus relationships) of the superclass are inherited by a subclass.

27.

From what type of class do subclasses inherit? Superclass.

28.

What are two types of whole-part hierarchies? Aggregation and composition.

29.

What three pieces of information about a class are put in the three parts of the class symbol? Name at the top, attributes in the middle, and methods at the bottom.

30.

What does the triangle symbol indicate on a line connecting classes on the class diagram? The triangle symbol indicates that the class it touches is a superclass and that the class at the other end of the line is a subclass.

31.

What is the difference between an abstract and a concrete class? An abstract class is a class that cannot be instantiated (cannot have objects created from it). It exists in the model to allow subclasses to inherit from it. A concrete class can be instantiated.

32.

How is an association class shown on a class diagram? A class connected to the association line with a dashed line.

33.

What types of classes are shown in a domain model class diagram? A class diagram without methods, created as part of the requirements model. They are classes in the work domain or problem domain of the user.

Systems Analysis and Design in a Changing World, Fourth Edition

5-5

Thinking Critically 1.

Provide an example of each of the three types of models that might apply to designing a car, to designing a house, and to designing an information system. Car: An equation describing an acceleration curve, a description of included features, and a sketch showing the appearance of the car from the side. House: Calculations defining strength of beams supporting the basement, a description of material planned for the exterior, the floor plan. Information system: A response-time calculation under different network load assumptions, a list of inputs and outputs, an ERD or class diagram.

2.

Explain the importance of elementary business processes (EBPs) in identifying use cases. Use cases can be identified by user goals, but it is important to identify use cases at the appropriate level of analysis—at too low of a level, the use case becomes a step in a process and at too high of a level, it lacks meaningful decomposition. The EBP is similar to the external, temporal, or state event that is defined for modern structured analysis. Therefore, identifying use cases is similar to identifying activities in the traditional approach.

3.

Explain why the event concept did not initially receive much attention in business systems analysis. The event concept was defined originally for modeling real-time systems used for controlling machines and other devices. Business systems did not operate in real time, so events were not initially thought to apply (but they do).

4.

Review the external event checklist in Figure 5-8, 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. External agent wants something requiring transaction: Student submits registration request. External agent wants information: Student wants to look up open sections available. Data change needs to be updated: Student submits change of address information. Management wants some information: Department head wants enrollment data for open sections.

Systems Analysis and Design in a Changing World, Fourth Edition

5.

5-6

Review the temporal event checklist in Figure 5-9. Would a student grade report be an internal or external output? Would a class list for the instructor be an internal or external output? What are some other internal and external outputs for a course registration system? What would you name the events that trigger these outputs using the guidelines for naming temporal events? Grade report: External Class list: Internal Other external: Financial aid confirmation, graduation notice, employment confirmation letter Other internal: Enrollment report and paycheck To name the temporal events, include Time to produce with the output name, as well as the recipient. For example, Time to produce grade report for students. Others are similar.

6.

In a course registration system, for the event Student registers for classes, create an event table entry listing the event, trigger, source, use case, response(s), and destination(s). For the event Time to produce grade reports, create another event table entry.

Event Student registers for classes Time to produce grade reports

7.

Trigger Registration request data

Source Student

Use Case Enroll student

Response New schedule

Destination Student

“3 days after final grades due deadline each semester”

(no source for temporal event)

Produce semester grade reports

Grade report

Student

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. The event for the bank is Customer makes a deposit. Grabbing the receipt is just the way the response (receipt) is implemented. Asking for a brochure on auto loans might be a separate event if the bank wants to remember that Kevin asked about it, or if they want to deduct one brochure in their brochure inventory system (if they have such a thing). If the bank does not need to remember the event, then doing something by the system is not “required.”

Systems Analysis and Design in a Changing World, Fourth Edition

8.

5-7

Consider the perfect technology assumption, which states that events should be included during analysis only if the system would be required to respond under perfect conditions. Could any of the events in the event table for Rocky Mountain Outfitters be eliminated based on this assumption? Explain. Why are events like User logs on to system and Time to back up the data required only under imperfect conditions? All of the events listed must be included because the system must do something each time one of the events occurs even if there is perfect technology. User logs on to system and Time to back up the data are only required because users are not perfectly honest, and disk drives are prone to crash or corrupt data.

9.

10.

Draw an entity relationship diagram, including minimum and maximum cardinality, 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 that 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

Car

owner name owner address

make model year

Draw a class diagram for the cars and owners described in exercise 9 but include subclasses for sports car, sedan, and minivan with appropriate attributes. Owner ownerName ownerAddress

1

0...*

Car make model year

SportsCar

Sedan

Minivan

raceStats

# ofDoors trunkSize

cargoCap seatingCap

Systems Analysis and Design in a Changing World, Fourth Edition

11.

5-8

Consider the entity-relationship diagram shown in Figure 5-28, the refined ERD showing course enrollment with an associative entity. 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? Yes to all four questions.

12.

Again consider the entity-relationship diagram shown in Figure 5-28. Add the following to the diagram and list any assumptions you had to make. A faculty member usually teaches many course sections, but some semesters a faculty member doesn’t teach any. Each course section must have at least one faculty member teaching it, but sometimes teams teach course sections. Furthermore, to make sure that all course sections are similar, one faculty member is assigned as course coordinator to oversee the course, and each faculty member can be coordinator of many courses. The relationship between faculty and course is “coordinates.” The relationship between faculty member and course section is “teaches.” Course course number* title creit hours

Faculty Member faculty ID* name rank

13.

Course Section section number* start time room number

Student student ID* name major

Course Enrollment grade

If the entity-relationship diagram you drew in exercise 12 above showed a many-tomany relationship between faculty member and course section, a further look at the relationship might reveal the need to store some additional information. What might this information include? (Hint: Does the instructor have specific office hours for each course section? Do you give an instructor some sort of evaluation for each course section?) Expand the ERD to allow the system to store this additional information.

Systems Analysis and Design in a Changing World, Fourth Edition

5-9

The many-to-many relationship “teaches” is expanded to an associative entity “Faculty Section,” which stores the role (lead teacher, co-teacher) the office hours for the section, and the final evaluation score for the section. Note that the key to the associative entity is the faculty ID and the section ID. The key for grade is not shown in the text or in this example, but it would be student ID and section ID in a relational database. Some instructors will want the keys; others will not see a need for keys in an associative entity. Course

Faculty Member

course number* title creit hours

faculty ID* name rank

Faculty Section

student ID* name major

Course Section

fac ID + sec #* role office hours evaluation score

14.

Student

Course Enrollment

section number* start time room number

grade

Draw a class diagram for the course enrollment system completed in question exercise 13. Be sure to use the correct notation for association classes (see Figure 534). FacultyMember facultyID name rank

1

Course courseNumber title creditHours

0...*

Student studentID name major

0..*

0..*

1

0...*

FacultySection role officeHours evalScore

0..*

CourseSection sectionNumber startTime roomNumber

0..*

CourseEnrollment grade

Systems Analysis and Design in a Changing World, Fourth Edition

15.

5-10

Consider a system that needs to store information about computers in a computer lab at a university, such as the features and location of each computer. What are the things that might be included in a model? What are some of the relationships among these things? What are some of the attributes of these things? Draw an entityrelationship model for this system. Things are computer, lab, and building. Computer has ID number, seat location, make, processor speed, memory amount, and monitor type. Lab has lab number, room number, operating hours, and number of attendants. Building has building number and building name. A building contains one or more labs; a lab is contained in one building. A lab contains one or more computers; a computer is contained in one lab. The ERD follows from the description above. Variations are expected.

16.

Draw a class diagram for the computer lab system described in exercise 15. The class diagram follows from the description in exercise 15. Variations are expected. Computer Lab

Building buildingNumber buidingName

17.

1

1..*

labNumber roomNumber operatingHours numberAttendants

1

1..*

computerID seatLocation make processorSpeed memoryAmount monitorType

Refer to the class diagram for bank accounts in Figure 5-38. 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. In addition, 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.

Systems Analysis and Design in a Changing World, Fourth Edition

5-11

Customer

Branch

name address

branchNumber address phone

1

1 0...*

CommercialCust

PersonalCust

creditRating contactPerson contactPhone

homePhone workPhone

0...*

Account accountNumber balance dateOpened makeDeposit makeWithdrawal

SavingsAccount

CheckingAccount

interestRate

checkStyle minBalance

calculateInterest

18.

Consider the domain model class diagram for Rocky Mountain Outfitters shown in Figure 5-41. If a Web order is created, how many attributes does it have? If a telephone order is created, how many attributes does it have? If an existing customer places a phone order for one item, how many new objects are created overall for this transaction? A Web order has eight attributes, a telephone order has nine attributes, and a mail order has eight attributes. The three types of orders have six attributes in common (inherited from Order) as well as some of their own. The Customer object already exists (0), the PhoneOrder object is created with values for eight attributes (1), an OrderItem object is created and associated with the MailOrder object (1), and a Transaction object is created and associated with the MailOrder object (1). That totals three objects. Note that a Shipment object will eventually be created that includes this item, but it will not be created until later when items are grouped into a shipment. Instructors should note that students will want to create an Order object and a

Systems Analysis and Design in a Changing World, Fourth Edition

5-12

MailOrder object and associate them (two objects instead of one). However, only one object for MailOrder is created. 19.

A product item for RMO is not the same as an inventory item. A product item is something like a men’s leather hunting jacket supplied by Leather ‘R Us. An inventory item is a specific size and color of the jacket—like a size medium brown leather hunting jacket. If RMO adds a new jacket to its catalog, and there are six sizes and three colors available in inventory, how many objects need to be added overall? The jacket is a product item (1). In inventory, an InventoryItem object is created for each color/size combination as long as each is available in stock. Therefore, given the assumptions implied by the model, there are 18 InventoryItem objects created. The total is 19 objects.

20.

Consider the following domain model class diagram showing college, department, and faculty members. A.

What kind of “relationships” are shown in the model? There are two association relationships.

B.

How many attributes does a "faculty member" have? Which (if any) have been inherited from another class? A faculty member has five attributes; none are inherited here.

C.

If you add information about one college, one department, and four faculty members, how many objects are added to the system? Six objects are added. Note that this is different from the inheritance that is shown in the mail order example in exercise 19. Because there is no inheritance here, these are separate objects that are created and then associated with each other.

D.

Can a faculty member be part of more than one department at the same time? Explain. Using minimum and maximum multiplicity (cardinality), we can say that a faculty member can be in more than one department at the same time. In the real world, for example, one teacher can be part of both the computer science and computer information systems departments (a split appointment is possible).

E.

Can a faculty member be part of two departments at the same time, where one department is in the college of business and the other department is in the college of arts and sciences? Explain.

Systems Analysis and Design in a Changing World, Fourth Edition

5-13

This is a good question to discuss in class. Draw a circle for a FacultyMember object (Billy Bob) and two circles for two separate Department objects (computer science and CIS). Connect the FacultyMember to each Department with two lines. These lines associate one FacultyMember object with two Department objects. Next, draw two College objects (business and sciences). Connect computer science to sciences and CIS to business. Now it should be clear that a faculty member can be part of two departments at the same time.

Systems Analysis and Design in a Changing World, Fourth Edition

5-14

Experiential Exercises 1.

Set up a meeting with a librarian. During your meeting, ask the librarian to describe the situations that come up in the library to which the book checkout system needs to respond. List these external events. Now ask about points in time, or deadlines, that require the system to produce a statement, notice, report, or other output. List these temporal events. Does it seem natural for the librarian to describe the system in this way? Similarly, ask the librarian to describe the things about which the system needs to store information. See whether you can get the librarian to list the important attributes and describe relationships among things. Does it seem natural for the librarian to describe these things? Create either an ERD or a class diagram based on what you learn. Answers will vary. External events might include Student checks out book, Student returns book, Student wants to check if book is available, and so on. Temporal events might include Time to send overdue notice, Time to declare book is lost, Time to produce monthly checkout reports for library administration, and so on. Things might include Book, Student, and Checkout Record. It should seem natural for the librarian to answer the questions if they are asked in the way suggested in the exercise.

2.

Visit a restaurant or the college foodservice and talk to a server (or talk with a friend who is a food server). Ask about the external events, temporal events, and data entities or objects, as you did in exercise 1. What are the events for order processing at a restaurant? Complete an event table and either an ERD or class diagram. Answers will vary. External events might include Customer places order, Customer changes order, Kitchen returns completed order, Customer pays bill, and so on. Temporal events might include Time to produce daily order totals report, Time to produce weekly sales analysis reports, and so on. Data entities or classes might include Order, Meal Item, Server, Invoice Record, and so on.

3.

Review the procedures for course registration at your university and talk with the staff in advising, in registration, and in your major department. Think about the sequence that goes on over an entire semester. What are the events that students trigger? What are the events that your major department triggers? What are the temporal events that result in information going to students? What are the temporal events that result in information going to instructors or departments? Answers will vary. Events might include Department schedules a class, Student enrolls in a class, Student changes schedule, Student drops a class, Instructor submits final grades, Time to generate grade report for students, Time to produce enrollment totals report for administration, and Time to produce class lists for faculty. Note that the event names should indicate information about the external agent or actor involved. Temporal events make the most sense if Time to is used at the beginning of the event name.

Systems Analysis and Design in a Changing World, Fourth Edition

4.

5-15

Again review information about your own university. Create generalization/specialization hierarchies using the domain model class diagram notation for (1) types of faculty, (2) types of students, (3) types of courses, (4) types of financial aid, and (5) types of housing. Include attributes for the superclass and the subclasses in each case. Answers will vary. Types of faculty might include tenure track or lecturer, and tenure track might include tenured or non-tenured. Types of students might include undergraduate or graduate or, in some cases, day student (full time) or evening student (part time). Financial aid might include scholarships, loans, or work-study. Housing might include on campus or off campus. On campus might include dorm, suite, or apartment. Please note that a subclass is included only if there are additional attributes (or methods) for it that do not apply to the superclass. Also, the subclass and its attributes are only included if the system being described requires keeping track of the distinction. Should there be a subclass? Only if the system must remember the additional specific details it provides.

Systems Analysis and Design in a Changing World, Fourth Edition

5-16

Case Studies Case Study: Spring Breaks ‘R’ Us Travel Service Booking System 1. To what events must the SBRU booking system respond? Create a complete event table listing the event, trigger, source, use case, response, and destination for each event. Be sure to consider only the events that trigger processing in the booking system, not the SBRU accounting system or the systems operated by the resorts. List of events and resulting use cases with explanations: 1.

Event: Resort submits availability information. Use case: Record resort availability information. This is the information sent to SBRU in the fall indicating what rooms are available and what the rates are for each week. The system records this information.

2.

Event: Time to produce brochure information for college representatives. Use case: Produce brochure information. As soon as December arrives, the system takes all of the resort information that has come in and produces the brochure information. Note that the format of the brochure might be a printed document or a Web site. A logical model would not indicate how the brochure was implemented or how it gets to the college representative.

3.

Event: Student group requests a reservation. Use case: Book student group. A group of students submits a reservation request for a specific resort during a specific week. Note that the college representative might interact with the students, but that interaction is outside the scope of this system as it is defined. No information is captured until the student group actually makes a reservation.

4.

Event: Time to produce booking information for resorts. Use case: Produce booking information for resorts. Before each spring break week begins, the system produces a list for each resort that shows who has booked rooms for that week. Each resort uses the information to check in arriving students. What the resort does is outside the scope of this system. A student paying the resort is also outside the scope of this system. Resorts later send commissions to SBRU accounting, which again is outside the scope of this system.

Systems Analysis and Design in a Changing World, Fourth Edition

5.

5-17

Instructors might include an additional event for producing booking reports every week for management of SBRU, although nothing was specifically mentioned in the case. Similarly, reports might be sent to the resorts or to college representatives to indicate how well bookings are going. You might assume that accounting can read data about bookings from the database to reconcile commission checks (accounting is a separate system), or that the booking system can generate a report for accounting at the end of each spring break week or at the end of the spring break season.

Event Table and Use Cases Event 1. Resort submits availability info 2. Time to produce brochure info for college reps 3. Student group requests a reservations 4. Time to produce booking info for resorts

Trigger Avail info

Source Resort

“December”

Reservation request “Right before each week”

Student group

Use Case Record resort availability info Produce brochure information

Response

Destination

Brochure info

College Rep

Book student group

Confirmation

Student

Produce booking info for resorts

Booking info

Resort

2. List the data entities (or classes) that are mentioned. List the attributes of each data entity (or class). List the relationships between data entities (or classes). The data entities (or classes) might include Resort, Week, Room Type, Recreational Facilities, College Rep, College, Student Group, Student, and Reservation. Note that the data stored includes information about external agents/actors as well as information about availability and reservations. 3. Which classes might be refined into a generalization/specialization hierarchy? List the superclass and any subclasses for each of them. There might be special types of rooms, types of resorts, types of recreational facilities, types of student groups, or types of college representatives. The key to deciding if a generalization/specialization hierarchy is required is to identify whether special information needs to be stored for each type (subclasses have additional attributes).

Systems Analysis and Design in a Changing World, Fourth Edition

5-18

Case Study: Real Estate Multiple Listing Service System 1.

To what events must the multiple listing service system respond? Create a complete event table listing the event, trigger, source, use case, response, and destination for each event. List of events and resulting use cases with explanations: 1.

Event: Real estate office submits new listing. Use case: Add new listing. The event is the real estate office sending in the information after the agent signs the listing.

2.

Event: Agent requests listing information. Use case: Provide listing information. This is the query facility where the agent can get listing information that meets search criteria.

3.

Event: Time to produce multiple listing book. Use case: Produce multiple listing books. This is a temporal event triggered twice a month, resulting in the multiple listing book being sent to the real estate agents. Note the “book” does not have to be printed on paper, so this can remain a logical model. The class might debate this, though.

4.

Event: Real estate office submits listing change request. Use case: Record listing change. This represents changes in the listings to correct errors, update terms such as price, and mark the status of a listing when it is under contract, sold, or withdrawn.

5 & 6. There really should be two additional events and resulting use cases, although they were not explicitly stated in the case. When real estate offices are added or changed, the system needs to maintain real estate office data. In addition, when an agent is added or needs updating, the system needs to maintain agent data. These two events/use cases could be added to the event table below.

Systems Analysis and Design in a Changing World, Fourth Edition

5-19

Event Table Event 1. Real estate office submits new listing 2. Agent requests listing info 3. Time to produce multiple listing book 4. Real estate office submits listing change request

2.

Trigger New listing

Source RE Office

Use Case Add new listing

Response

Destination

Listing query

Agent

Provide listing information Produce multiple listing book

Listing information Multiple listing book

Agent

“15th and 30th of the month” Listing change request

RE Office

Agent

Record listing change

Draw an entity relationship diagram to represent the data storage requirements for the multiple listing service system, including the attributes mentioned. Does your model include data entities for offer, buyer, and closing? If so, reconsider. Include information the multiple listing service needs to store, which might be different from information the real estate office needs to store. Data entities and attributes for ERD: This is limited to three data entities to store information on the listings and the agent and office responsible for each listing. Buyers, sellers, and closings are not included. The data entities and attributes are: Real Estate Office Office Number Name Office Manager Name Address Phone FAX Real Estate Agent Agent Number (license number?) Name Office Phone Home Phone Email Address Cell Phone

Systems Analysis and Design in a Changing World, Fourth Edition

Real Estate Listing Listing Number Address Year Built Square Feet Number Bedrooms Number Baths Owner Name Owner Phone Asking Price Date Listed Date Last Updated Status Code

5-20

Systems Analysis and Design in a Changing World, Fourth Edition

3.

5-21

Draw a domain model class diagram that corresponds to the ERD but shows there are different types of listings that have different attributes. The description above assumes all listings are for single-family houses. What about multi-family listings or commercial property listings? The initial solution would be this: RealEstateOffice officeNumber name officeManager address phone FAX

RealEstateAgent

1

1..*

agentNumber name officePhone homePhone cellPhone emailAddress 1 0..*

Listing listingNumber address yearBuilt numberBedrooms numberBathrooms ownerName ownerPhone askingPrice dateListed dateLastUpdated statusCode

Take attributes from Listing that apply to single-family house and put them in a subclass SingleFamilyListing. Put attributes applying to commercial listings in a subclass CommercialListing. Revised solution would be this:

Systems Analysis and Design in a Changing World, Fourth Edition

Listing

RealEstateOffice officeNumber name officeManager address phone FAX

5-22

RealEstateAgent

1

1..*

agentNumber name officePhone homePhone cellPhone emailAddress

1

0..*

listingNumber address yearBuilt ownerName ownerPhone askingPrice dateListed dateLastUpdated statusCode

SingleFamilyListing

CommercialListing

numberBedrooms numberBathrooms

zoning numberStuctures fireRating occupancy

Systems Analysis and Design in a Changing World, Fourth Edition

5-23

Case Study: The State Patrol Ticket Processing 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. List of events and resulting use cases with explanations: 1.

Event: Officer submits a ticket. Use case: Record new ticket. The officer giving the ticket to the driver is outside of the scope of this system. It is part of the state patrol operations system that also includes checking the driver’s license and car registration and other interactions between the officer and the driver.

2.

Event: Driver sends in fine payment. Use case: Record fine payment. The fine payment event can happen right after the ticket if the plea is guilty or after a trial is completed if the verdict is guilty. In this respect, the event is “reused.” Some students might call this event “driver pleads guilty” versus “driver requests a trial.” They are on the right track, but this doesn’t allow the reuse of the event following a trial.

3.

Event: Driver requests a trial. Use case: Process trial request. Even though the same envelope is returned in the existing physical system, this is a separate event in terms of the processing required. If a trial is requested, the system sends information to the court and sends the questionnaire to the driver. The driver and the court then work out the details of the trial. The questionnaire is not returned to the ticket processing system

4.

Event: Court sends in verdict. Use case: Record verdict. Here the court simply sends in information about the verdict, either guilty or innocent. If the verdict is guilty, the court gives another envelope to the driver to send in payment for the fine.

5.

Event: Time to produce warrant request. Use case: Produce warrant request. This event occurs if the fine is not paid immediately or if the fine is not paid following a trail. It is another example of reuse.

Systems Analysis and Design in a Changing World, Fourth Edition

5-24

Event Table

2.

Event 1. Officer submits ticket 2. Driver sends in fine payment 3. Driver requests trial

Trigger New ticket

Source Officer

Use Case Record new ticket

Fine Payment

Driver

Record fine payment

Trial request

Driver

Process trial request

4. Court sends in verdict 5. Time to produce warrant request

Verdict

Court

Record verdict

“two weeks after fine is due (originally or after trial)”

Produce warrant request

Response

Destination

Trail data questionnaire

Driver

Ticket details

Court

Warrant request notice

Court

Draw an entity-relationship diagram to represent the data storage requirements 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. Data entities and attributes for ERD: Driver (read but not updated) License Number* Name Address Expiration Date Data of Birth Restriction Ticket (created and updated by this system) Ticket Number* Date of Ticket Time of Ticket Location Violation Type Fine Amount Date Paid Plea Trail Date Verdict

Systems Analysis and Design in a Changing World, Fourth Edition

5-25

Court (read but not updated) Court Number Name Address Officer (read but not updated) Badge Number Name Rank Primary Assignment Mailing Address Discussion of Integration The data read but not updated is maintained by the other state patrol systems. Similarly, the ticket data maintained here is read by the other systems. Therefore, the data model must be coordinated with the other systems. If one system-wide data model is produced for the state patrol, it will be easier to maintain integration. One weakness in this solution is the court data. What system maintains it? Somehow the court names and addresses need to be added and updated. If the ticket processing system is responsible for the data, a separate event should be added named Court sends in updated court information. 3.

Draw a domain model class diagram that corresponds to the ERD but 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. Research your state requirements and create a generalization/specialization hierarchy for the class driver showing the different attributes each special type of driver might have. Consider the same issues for types of tickets. Include some special types of tickets in a generalization/specialization hierarchy in the class diagram. Answers will vary depending on the state or province. In the approach below, note that Ticket is an abstract class (in italics), meaning a ticket must be either a minor or a major violation. On the other hand, Driver is a concrete class, meaning that there are three types of drivers shown: a (regular) driver, a student driver with some additional attributes, or a commercial driver with another set of additional attributes.

Systems Analysis and Design in a Changing World, Fourth Edition

5-26

Initial solution would be this: Ticket Driver licenseNumber licenseClass name address expirationDate dateOfBirth Restiction

1

0..*

Officer

ticketNumber dateOfTicket timeOfTicket violationType fineAmount datePaid plea trialDate verdict

1

0..*

badgeNumber name rank primaryAssignment mailingAddress

0..* 1

Court courtNumber name address

Revised solution would be similar to this: Officer

Driver licenseNumber licenseClass name address expirationDate dateOfBirth restiction

badgeNumber name rank primaryAssignment mailingAddress

1

Ticket

1 0..*

ticketNumber dateOfTicket timeOfTicket

0..*

Court

0..* 1

StudentDriver

CommercialDriver

beginDate educationCode responsibleParent testScore

maxAxels maxWeight commercialCode medExamDate commRestriction

MinorViolation violationType fineAmount datePaid

courtNumber name address

MajorViolation majorType courtDate plea verdict suspensionCode

Systems Analysis and Design in a Changing World, Fourth Edition

5-27

Case Study: Rethinking Rocky Mountain Outfitters When listing nouns and making some decisions about the initial list of things (see Figure 5-18), the RMO team decided to research Customer Account as a possible data entity or class if the system included an RMO payment plan (similar to a company charge account plan). Many retail store chains have their own charge accounts for the convenience of the customer—to increase sales to the customer and to better track customer purchase behavior. Consider the implications to the system if management decided to incorporate an RMO charge account and payment plan as part of the customer support system. 1.

Discuss the implications that such a change would have on the scope of the project. How might this new capability change the list of stakeholders the team would involve when collecting information and defining the requirements? Would the change have any effect on other RMO systems or system projects planned or under way? Would the change have any effect on the project plan originally developed by Barbara Halifax? In other words, is this a minor change or a major change? Answers will vary. Scope would increase. The project team would need to discuss the system with accounts receivable and financial stakeholders. Who would lend RMO the money to carry the customers? The project team would need to discuss payment plan and collections procedures. This change would greatly affect the planned accounting/finance system.

2.

What events need to be added to the event table? Complete the event table entries for these additional events. What activities or use cases for existing events might be changed because of a charge account and payment plan? Explain. The project team would need to add events for Customer makes a payment, Time to send monthly bill, Time to produce accounts receivable reports, Time to send late notices, and Time to notify collections agency of delinquent accounts. The Customer makes purchase event would also need to be changed.

3.

What are some additional things and relationships among things that the system would be required to store because of the charge account and payment plan? Modify the entity-relationship diagram and the class diagram to reflect these charges Customer account and customer payment would need to be added to the ERD or class diagram.

Systems Analysis and Design in a Changing World, Fourth Edition

5-28

Case Study: Focusing on Reliable Pharmaceutical Service In Chapter 1, you learned about the background and prescription-processing operations for Reliable Pharmaceutical Service. As discussed in this chapter, defining the requirements for the new system starts by taking the information gathered about the needed system and then focusing on the events that require system processing and on the things about which the system needs to store information. The full system would involve many events and things. In this chapter’s case exercise, we focus on only a subset of events for the system and a subset of data entities or classes. Later chapters’ exercises will add to the scope and complexity of the requirements for Reliable. 1. Create an event table that lists information about system requirements based on the following specific system processing: When a nursing home needs to fill prescriptions for its patients, it provides order details to Reliable. Reliable immediately records information about the order and prescriptions. Prescription orders come in from all of Reliable’s nursing-home clients throughout the day. At the start of each 12-hour shift, Reliable prepares a case manifest, detailing all recent orders, which is given to one of the pharmacists. When the pharmacist has assembled the orders for each client, the pharmacist records the order fulfillment. (Review the Reliable case description at the end of Chapter 1 for more details.) In addition, the system needs to add or update patient information, add or update drug inventory information, produce purchase orders to replenish the drug inventory, record inventory adjustments, and generate various management reports. For now, ignore any billing, payments, or insurance processing.

Event Prescription information changes Time to fill order Patient information changes Manufacturer information changes Drug information changes (includes manufacturer packaging

Trigger(s) Prescription data “Beginning of each 12-hour shift” Updated patient data Updated manufacturer data Updated drug data

Source Client unit

Use Case Maintain prescription data Fill order

Response

Destination

Case manifest

Client health-care organization

Client unit

Maintain patient data

Case manifest label

Order fulfillment

Manufacturer

Maintain manufacturer data Maintain drug data

Pharmacist

Systems Analysis and Design in a Changing World, Fourth Edition

5-29

changes) Drug inventory information changes Time to replenish inventory Drug shipment arrives Pharmacist information changes Client healthcare organization information changes Client unit information changes

2.

Inventory discrepancy data Inventory disposal data “Reorder point reached for one or more drugs” (a state event) Drug shipment packing slip Updated pharmacist data Updated client healthcare organization data Updated client unit data

Pharmacist

Maintain drug inventory data

Produce purchase order

Manufacturer Human resources Client healthcare organization Client healthcare organization or client unit

Purchase order

Manufacturer

Record drug shipment receipt Maintain pharmacist data Maintain client health-care organization data Maintain client unit data

Create an entity-relationship diagram that shows the data storage requirements for the following portion of the system: Add a few attributes to each data entity and show minimum and maximum cardinality. To process the prescription order, Reliable needs to know about the patients, the nursing home, and the nursing-home unit where each patient resides. Each nursing home has at least one, but possibly many, units. A patient is assigned to a specific unit. An order consists of one or more prescriptions, each for one specific drug and for one specific patient. An order, therefore, consists of prescriptions for more than one patient. Careful tracking and record keeping is obviously crucial. In addition, each patient has many prescriptions. One pharmacist fills each order.

Systems Analysis and Design in a Changing World, Fourth Edition

3.

5-30

Create a domain model class diagram for the object-oriented approach that shows the same requirements as described in step 2. Include a few attributes for each class and show minimum and maximum multiplicity. Be sure to identity any association classes and use the correct notation.

Systems Analysis and Design in a Changing World, Fourth Edition

4.

5-31

How important is it to understand that each order includes prescriptions for more than one patient? Is that the type of information that is difficult to sort out at first? Did you see the implications initially, or did you have to work through the model until it made sense to you? Discuss It is important to understand that each order includes prescriptions for more than one patient to document the associations and multiplicity correctly. In this case, it is important to define an order correctly. An order from this perspective includes many prescriptions for the nursing home. If the analyst thinks only of his or her personal experience, he or she might assume an order is for one patient. Typically, this type of information is difficult to sort out at first. Remember that the domain model defines key terms and concepts that are important in the users’ work. Be careful not to oversimplify or make assumptions without checking the facts carefully.

View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF