Chapter 14 Review Questions

¡Supera tus tareas y exámenes ahora con Quizwiz!

Identify the model(s) that contains each of the following components.

• Aggregation association - Class Diagram • Class - Class Diagram, Sequence Diagram • Derived attributes - Class Diagram • Extends association - Use Case Diagram • Execution occurrence - Sequence Diagram • Guard condition - Behavioral State Machine Diagram • Initial state - Behavioral State Machine Diagram • Links- Sequence Diagram • Message- Sequence Diagram • Multiplicity - Class Diagram • Specialized actor - Use Case Diagram • System boundary - Use Case Diagram • Update method - Class Diagram

Describe how the object approach supports the program design concepts of cohesion and coupling that were presented in Chapter 10.

Cohesion is supported in the object approach because each object contains data and behaviors that are specific to it. The only thing the object knows about is the data it includes and the behaviors it can perform. Coupling is supported in the object module because the objects are highly independent from each other. The only interaction between objects occurs in the form of messages passed between objects which may trigger methods, or behaviors.

Give three examples of derived attributes that may exist on a class diagram. How would they be denoted on the model?

Derived attributes are attributes that are calculated or derived, are shown with a / before the attribute name. Examples include /age (derived from birthdate and current date; /extended_price (calculated as quantity * price); /amount_due (calculated as current_amount + prior_balance).

Give two examples of the extends associations on a use-case diagram. Give two examples for the includes association.

A complex use case may be extended when some of its complex steps are extracted into their own use case. The extends use case can be invoked only from the use case it extends. An example might be obtaining and updating customer information in the process of taking an order; another example might be producing a picking ticket for the distribution department after an order is accepted. In other situations, it may be discovered that the same common steps are performed in several different use cases. Here it makes sense to extract these common tasks into a separate use case that can be referenced by any user case that needs it. Examples include calculating an amount due which could be needed in several places throughout the system, and sending a notification to a customer.

How can the object approach improve the systems development process?

A major consequence of the object approach is that a complex system can be factored into smaller, more manageable, independent components. These components should be highly reusable, and so should simplify systems development efforts. It may be easier for end users to discuss the system as a collection of objects, or logical units, rather than a set of data and a set of processes.

Why is an association class used for a class diagram? Give an example of an association class that may be found in a class diagram that captures students and the courses that they have taken.

A relationship itself may have associated properties. An association class can be formed that has its own attributes and methods in this circumstance.

Give two examples of aggregation associations and generalization associations. How is each type of association depicted on a class diagram?

Aggregation associations are used when classes actually comprise other classes. A solid diamond is placed nearest the class representing the aggregation, and lines are drawn to the classes that serve as its parts. A counseling staff may be made up of psychiatrists, psychologists, and counselors. Generalization associations show that a subclass inherits from a superclass. This is shown with a solid line from the subclass to the superclass and a hollow arrow pointing at the superclass. A label is attached to the relationship that denotes why an object would fall into one or another subclass. A superclass of University Employee might have subclasses of faculty, staff, clerical, and administrator.

Describe the steps used to create a sequence diagram.

First, identify the classes that interact with each other during the use case scenario. List these across the top of the diagram. Next, add arrows to represent the messages being passed from object to object. Label the arrows with descriptive terms and include any parameters that are passed as a part of the message. Draw lifelines under each class, and terminate those that cease to exist within the use case by placing an X at its end. Draw narrow rectangles down the lifeline to show when the classes are sending and receiving messages.

Describe the steps in creating a use-case diagram.

First, identify the use cases. Each of the system's major functions is identified, and a scenario description of each function is created. The system boundary is drawn, and the use cases are placed within the boundary. Actors representing external roles or systems should be placed outside the system boundary. Finally, associations are added which establish links between the actors and the use-cases with which they interact.

Do you think that UML will become more popular than the traditional structured techniques discussed previously? Why or why not?

It is most likely that tools from UML will be integrated gradually into mainstream SDLC practice, rather than one set of tools becoming more popular than others. The practice of developing systems will continually evolve, and good, effective ideas will be essential to maintaining an effective practice of systems development.

Do lifelines always continue down the entire page of a sequence diagram? Explain.

Lifelines can be terminated on a sequence diagram if at some point in the use case the object ceases to exist. This is shown by placing an X at the end of the lifeline.

Which of the following could be an actor found on a use-case diagram? Why?

Ms. Mary Smith - no, an actor is a role, not an individual Supplier - yes Customer - yes Internet customer - yes Mr. John Seals - no, an actor is a role, not an individual Data-entry clerk - no, an actor is external to the system; clerks are likely to be within the system Database administrator- no, an actor is external to the system

Contrast the items in the following sets of terms: - Object; class; instance; entity relationship diagram (ERD) entity - Property; method; attribute - State; behavior - Superclass; subclass - Concrete class; abstract class - Method; message - Encapsulation; inheritance; polymorphism - Static binding; dynamic binding

Object; class; instance; entity relationship diagram (ERD) entity An object is a person, place, event, or thing about which we want to capture information. It is very similar to an ERD entity; however, an object can exhibit behaviors while an entity does not. A class is a general template that is used to define and create specific instances, or objects. An instance is a specific occurrence of an object. Property; method; attribute Objects have characteristics about which we want to capture data. These characteristics are referred to as properties or attributes. Methods are actions that an object can perform. The fact that objects can exhibit behaviors that are described by methods is a major distinction between an ERD entity and an object. State; behavior The state of an object is defined by the value of its properties and its relationship with other objects at a particular point in time. An object's behavior is described by the things that the object can do. Superclass; subclass A class is a category of objects that we create, and classes are organized into a hierarchy. Superclasses are the broader, general classes at the top of the hierarchy. Subclasses are the more specific classes at the bottom of the hierarchy. Concrete class; abstract class If a class has specific instances that occur for it, then the class is referred to as a concrete class. If a class serves as a more general template for other more specific classes and has no instances that occur for it, than that class is referred to as an abstract class. Method; message A method is a function or operation that an object can perform. Messages are the information that is passed o an object to trigger a method. Encapsulation; inheritance; polymorphism Encapsulation means that the internal data and processes of an object are concealed from the outside. Inheritance refers to the fact that subclasses of objects inherit properties and methods from the superclasses above them. This simplifies the specification of an object's properties and methods. Polymorphism refers to the fact that the same message or specified behavior can be carried out differently for different object classes. Static binding; dynamic binding Static (also known as early) binding means that a reference to an object is explicitly bound to a specific type of object before runtime. Dynamic (also known as late) binding means that a reference to specific type of object is deferred until runtime.

What three kinds of events can lead to state transitions on a behavioral state machine diagram?

One event can be some condition becoming true; another could be the receipt of a message from an object, and another could be the passage of a period of time.

What are the two kinds of labels that a class diagram can have for each association? When is each kind of label used?

One kind of label is the name of the relationship, and the label describes exactly how the two classes are related to each other. The other type of label describes the role that the classes play in the relationship. Here, a + is placed before the label to indicate the role played in the relationship. Use whichever type of label best fits the business situation being described in the model.

Are states always depicted using rounded rectangles on a behavioral state machine diagram? Explain.

States are denoted with rounded rectangles except for the initial state, which is shown by a filled-in circle, and the final state, which is shown by a circle surrounding a filled-in circle.

Some experts argue that object-oriented techniques are simpler for novices to understand and use than are DFDs and ERDs. Do you agree? Why or why not?

The OO techniques are perhaps a more realistic way of thinking about a system. Most people do not naturally think of data and processes as being separate from each other. They naturally occur together, and so this is a natural way of thinking about them. Most developers who have been trained in the structured techniques have to 'break' their old ways of thinking about systems, but once that is done, have little trouble working in the OO world.

What is Unified Modeling Language (UML)? How does it support the object approach to systems development?

The UML is the Unified Modeling Language, which was created to provide a common vocabulary of object-based terms and diagramming techniques. The UML is broad enough to support the work that must be done in an entire systems development project. UML has been accepted as a standard object-oriented development language.

Compare and contrast the rational unified process (RUP) with UML.

The Unified Modeling Language (UML) provides a common vocabulary of objectbased terms and diagramming techniques. UML is NOT a methodology, as it does not mandate how to apply the diagramming techniques. Rational unified process is a methodology developed by Rational Software Corp. that defines how to apply the Unified Modeling Language throughout a systems development process. Rational unified process is a rapid application development approach.

Describe the type of class that is best represented by a behavioral state machine diagram. Give two examples of classes that would be good candidates for behavioral state machine diagrams.

The best classes to represent on a statechart are classes that are very dynamic and complex, and changeable over a period of time. A charge account can be active, paid up, past due, suspended, and closed.

How is a class diagram different from an ERD?

The class diagram is very similar to the ERD, but it shows classes which include both behaviors and states, while the ERD entities only show attributes (data).

Describe the way in which the RUP is implemented on a systems project.

The first step of the rational unified process is building use cases for the system. Next, analysts develop analysis diagrams, which are gradually modified into design diagrams with physical implementation details added.

How is the object approach different from the data and process approaches to systems development?

The object approach seeks to combine data and processes that are related to each other into self-contained units called objects. The traditional development approach separates the data from the processes that use the data, which some feel is a more cumbersome way of looking at the system.

Describe the main building blocks for the sequence diagram and how they are represented on the model.

The sequence diagram includes classes, shown by rectangles at the top of the diagram; lifelines showing the life of an object during a use case, denoted by a vertical dotted line extending below the class; a focus of control shows when an object is 'active,' sending or receiving messages, and is shown as a long narrow rectangle placed over top of a lifeline; and messages, shown as a directional arrow between objects, labeled with the message description and parameters.

Give examples of a static model and a dynamic model in UML. How are the two kinds of models different?

The sequence diagram is a dynamic model that shows an explicit sequence of messages that are passed between classes in a defined interaction. A class diagram is a static model that shows the classes and the relationships among classes that remain constant in the system over time. Dynamic models show change, while static models are unchanging.

How is the use-case diagram similar to the context and Level 0 data flow diagrams (DFDs)? How is it different?

The use-case diagram is similar in the sense that it shows the actors who interact with the system (similar to external entities) and it shows the major system functions. It does not show any information flowing between system functions and the system's environment nor does it show any stored data in the system.

How can you employ the use-case report to develop a use-case diagram?

The use-case report describes in detail one of the system's major functions. Each of these reports is represented on the use case diagram.

Consider a process called "validate credit history," which is used to validate the credit history for customers who want to take out a loan. Explain how it can be an example of an includes association on a use case diagram. Describe how it is an example of an extends association. As an analyst, how would you know which interpretation is correct?

This process can be an includes association on a use case diagram if it is used or referenced, by several use cases on the diagram. It can also be an example of an extends association if it extends, or is added to the functionality of another use case.

Draw the associations that are described by the following business rules. Include the multiplicities for each relationship.

see review question!

Identify the following methods as constructor, query, or update. Which operations would not need to be shown in the class rectangle?

see review question!

What do you think are three common mistakes that novice analysts make in using UML techniques?

• Failing to take advantage of the reusability of objects in the system design. • Failing to transform their thinking from traditional SAD to OOSAD. • Failing to grasp and use the concept of inheritance correctly when establishing classes.


Conjuntos de estudio relacionados

PARAGRAPHS: Paragraph Flow, paragraph editing Quiz

View Set

We The People Ch. 4 (Inquizitive)

View Set

CS397 - Natural Language Processing MIDTERM REVIEW

View Set

CyberSecurity Midterm Study Questions (Quiz #1-5)

View Set

Chapter 24: Management of Patients With Chronic Pulmonary Disease

View Set

Chapter 2 Quiz Types of Policies

View Set

Microeconomics Final Exam Review

View Set

Driver's Manual: Part 12, Driving Emergencies

View Set