Class and Method Design Test Bank Docx Chapter.8 - Systems Analysis with UML 6th Edition | Test Bank with Key by Dennis and Wixom by Dennis Wixom, Tegarden. DOCX document preview.

Class and Method Design Test Bank Docx Chapter.8

Chapter 9 Class and Method Design
Test Bank

Multiple choices

  1. Detailed design is important for two reasons. First, preexisting classes and components need to be understood, organized, and pieced together, and second, _____.

a. it is common for the project team to write some code and produce original classes that support the application logic of the system

b. it is tempting to jump in without planning

c. modular design is outdated

d. the SDLC continues to be used instead of a more reliable method of analysis for systems

e. top-down modular approaches are an acceptable method of analysis that must be performed during the planning phase

  1. In an object-oriented system, changes can take place at the following level of abstraction.

a. variable

b. method

c. class/object

d. cluster (examples: partition, package)

e. all of these

  1. _____ has emerged as the standard for the design of object-oriented systems.

a. Java

b. C++

c. VisualBasic

d. UML

e. Microsoft .NET

  1. In terms of levels of abstraction, which of the following is at the lowest level relative to the rest?

a. system

b. partition/package

c. library

d. class/object

e. method

  1. _____ means having the ability to send the same message to different objects, which can be interpreted differently by different objects.

a. encapsulation

b. polymorphism

c. inheritance

d. coupling

e. cohesion

  1. _____ suggests that only the information required to use an object should be available outside the object.

a. Encapsulation

b. Information hiding

c. Polymorphism

d. Inheritance

e. Cohesion

  1. _____ refers to the level of interdependency or interrelationship among the modules in a system.

a. coupling

b. cohesion

c. connascence

d. multiple inheritance

e. single inheritance

  1. A class/object should only represent one thing, and a method should only solve a single task. This principle is often referred to as _____.

a. coupling

b. cohesion

c. connascence

d. multiple inheritance

e. none of these

  1. What are the two types of coupling in object-oriented systems?

a. interaction, data

b. data, inheritance

c. data, stamp

d. interaction, inheritance

e. data, common

  1. Which of the following types of interaction coupling is “best?”

a. stamp

b. data

c. content or pathological

d. common or global

e. control

  1. Object-oriented systems have three general types of cohesion: _____, _____, and _____.

a. method, class, inheritance

b. method, generalization/specialization, inheritance

c. generalization/specialization, class, object

d. method, class, generalization/specialization

e. functional, sequential, procedural

  1. Fan-out refers to _____.

a. the number of attributes a class has

b. the number of messages sent by a method

c. the number of times a message is sent by a method

d. the number of times an attribute is passed from a class

e. none of these

  1. Which of the following Structured English statements is an advanced form of an IF statement?

a. Action statement

b. For statement

c. While statement

d. Case statement

e. Do statement

  1. Constraints can be written in either a natural language, a semiformal language, or a formal language such as ________________.

a. UML

b. Structured English

c. Use case diagrams

d. English

e. UML’s Object Constraints Language

  1. There are three different types of constraints typically captured in object-oriented design: preconditions, postconditions, and _____________.

a. regular conditions

b. guard conditions

c. exception handling

d. invariants

e. contracts

  1. Essentially, all OCL expressions are simply a declarative statement that evaluates to either being true or false. If the expression evaluates to true, then the constraint has been _______________.

a. satisfied

b. executed

c. always true

d. served as an invariant

e. skipped

  1. Like other problem domain models, the _____________, contracts, and method specifications in class and method design need to be verified and validated.

a. constraints

b. classes

c. behaviors

d. associations

e. polymorphisms

  1. The constraints and contracts in class and method design models were derived from the ____________ requirements and the problem domain representations.

a. business

b. regularly

c. non-functional

d. functional

e. reliability

True/False

  1. Many project teams are too quick to jump into writing code for classes without first designing them.
  2. Polymorphism is the mechanism that combines the processes and data into a single object.
  3. Subclasses inherit the appropriate attributes and methods from the superclass above them.
  4. Because of potential problems, developers must be aware of the effects of modifications in a superclass and in each of the subclasses that will inherit the modification.
  5. It is impossible for a subclass to inherit from more than one superclass.
  6. C++ forces programmers to write code with good levels of interaction coupling.
  7. High levels of inheritance coupling in a system are always good and desirable.
  8. You should maximize connascence within an encapsulation boundary and minimize connascence between the encapsulation boundaries.
  9. Fan-out refers to the number of attributes passed by one object to another.
  10. A derived attribute results from storing the value of a computation.
  11. Contracts document the message passing that takes place between objects.
  12. Method specifications can be somewhat vague, as the programmers will have a good idea of what the analyst needs done in the system.
  13. Clicking a mouse can be an event.
  14. A Case statement is an advanced form of an If statement.
  15. A For statement simply performs some action.
  16. When a calling method passes a variable to the called method, the two exhibit content or pathological coupling.
  17. The signature of a method is completely specified by the name of the method and the parameters that must be passed to the method.
  18. A self-contained, encapsulated piece of software that can be plugged into a system is often referred to as a design pattern.
  19. Method signatures, in conjunction with frameworks, class libraries and design patterns, offer excellent opportunities for reuse.
  20. Using an attribute to store the value of a computation is the use of a derived attribute.
  21. Moving the attributes to a calling class when it is the only class that needs those attributes is not a method of optimizing the design of a system?
  22. A post-condition is a constraint that must be met for a method to execute.
  23. A pre-condition is a constraint that must be met after the method executes.
  24. Invariants model constraints that must always be true for all instances of a class.
  25. Contracts contain a detailed algorithmic description of how the method is to work.
  26. A listing of the items that trigger the functionality in the program is known as events.
  27. Written documents that include explicit instructions on how to write the code to implement the method are called method specifications.
  28. A Case statement in Structured English specifies some action to be performed.
  29. An If statement in Structured English controls actions that are performed under different conditions.
  30. A Case statement in Structured English has several mutually exclusive branches.
  31. Constraints can only be written in either a semiformal language or a formal language.
  32. There are only two different types of constraints typically captured in object-oriented design: preconditions and postconditions.
  33. Invariants are a type of constraints captured in object-oriented design
  34. Essentially, all OCL expressions are simply a declarative statement that evaluates to either being true or false.
  35. Since a manager has a higher position than an employee, it is a good idea to design class Manager as a superclass, and the class Employee inherits class Manager.
  36. One of inheritance abuses in Object-oriented design is the inheritance was used to implement an association relationship.
  37. In order to verifying and validating class and method design, all constraints, contracts, and method specifications must be tested.
  38. UML’s Object Constraint Language is a formal language.

Short Answer

  1. What is coupling? Is this desirable or undesirable in a system? Why?
  2. What is interaction coupling? How can interaction coupling be minimized?
  3. What is inheritance coupling? How can inheritance coupling be minimized?
  4. Describe the concept of inheritance. How does this impact the development of object-oriented systems?
  5. What is connascence? Is this desirable or undesirable in a system? Why?
  6. What are the four opportunities for reuse identified in the text?
  7. What are the five optimizations that should be done to create a more efficient design?

Second, each attribute for each class should be reviewed. Which method uses the attributes and which objects use the methods should be determined. If the only methods that use an attribute are read and update methods and only instances of a single class send messages to read and update the attribute, the attribute may belong with the calling class instead of the called class. Moving the attribute will speed up the system.

Third, review the direct and indirect fan-out of each method. If the fan-out of a method is high relative to that of other methods in the system, the method should be optimized.

Fourth, look at the execution order of the statements in often-used methods. Sometimes rearranging some of the statements can make it more efficient.

Finally, avoid re-computation by creating derived attributes.

  1. What are the three types of constraints typically captured in object-oriented design?

Pre-conditions are constraints that must be met for a method to execute. A post-condition is a constraint that must be met after the method executes or the effect of the method execution must be undone. Invariants model constraints that must always be true for all instances of a class.

  1. Use Structured English to write the logic for the process “register for a class” at your college or university. Focus on a single class, but consider the possible exceptions that may occur when you try to register for that class.
  2. Why is it necessary for an analyst to detail the specifications for the individual classes and methods? What techniques are useful for doing this documentation?
  3. What is the Object Constraint Language? Give an OCL example.
  4. What are the different ways to optimize an object system?
  5. Review the access paths between objects.
  6. Review the attributes of each class.
  7. Review the direct and indirect fan-out of each method.
  8. Look at execution order of the statements in often-used methods.
  9. Avoid re-computation by creating derived attributes.
  10. Briefly discuss the procedure for verifying and validating class and method design.

Document Information

Document Type:
DOCX
Chapter Number:
8
Created Date:
Aug 21, 2025
Chapter Name:
Chapter 8 Class and Method Design
Author:
Dennis Wixom, Tegarden

Connected Book

Systems Analysis with UML 6th Edition | Test Bank with Key by Dennis and Wixom

By Dennis Wixom, Tegarden

Test Bank General
View Product →

$24.99

100% satisfaction guarantee

Buy Full Test Bank

Benefits

Immediately available after payment
Answers are available after payment
ZIP file includes all related files
Files are in Word format (DOCX)
Check the description to see the contents of each ZIP file
We do not share your information with any third party