sophiasapiens.chez.comsophiasapiens.chez.com/informatique/system-analysis-and... · web viewchapter...

36

Click here to load reader

Upload: lamnhan

Post on 07-Apr-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

Chapter 10 Object-Oriented Analysis and Modeling using UML

True/False Questions

1. Object-oriented analysis (OOA) techniques are used to (1) study existing objects to see if they can be reused or adapted for new uses; and (2) define new or modified objects that will be combined with existing objects into a useful business computing application.

Answer: True 2. An object is something that is or is capable of being seen, touched, or otherwise

sensed, and about which users store data and associate behavior.

Answer: True

3. Attributes are the data that represents characteristics of interest about an object.

Answer: True

4. An attribute is something that is or is capable of being seen, touched or otherwise sensed, and about which users store data and associate behavior.

Answer: False Rationale: This describes an object, not an attribute.

5. Behavior refers to those things that the object can do and that correspond to functions that act on the object's data (or attributes). This is commonly referred to as a method, operation or service.

Answer: True

6. Behavior is the packaging of several items together into one unit.

Answer: False Rationale: This describes encapsulation, not behavior.

7. An object class is a set of object instances that share the same attributes and behavior.

Answer: True

Page 2: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

8. An object instance is a set of object classes that share the same attributes and behavior.

Answer: False Rationale: An object class is a set of object instances that share the same attributes and behavior.

9. Inheritance means that methods and attributes defined in an object class can be inherited or reused by another object class.

Answer: True

10. A supertype is an object class whose instances store attributes that are common to one or more subtypes of the object class.

Answer: True

11. A subtype is an object class whose instances store attributes that are common to one or more supertypes of the object class.

Answer: False Rationale: A supertype is an object class whose instances store attributes that are common to one or more subtypes of the object class.

12. An object class relationship is a natural business association that exists between one or more object classes.

Answer: True Page: 376

13. A message is passed when one object invokes one or more of another object's methods (behaviors) to request information or some action.

Answer: True

14. An attribute is passed when one object invokes one or more of another object's methods (behaviors) to request information or some action.

Answer: False Rationale: A message is passed when one object invokes one or more of another object's methods (behaviors) to request information or some action.

Page 3: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

15. Polymorphism means "many forms." Applied to object-oriented techniques, it means that the same named behavior may be completed differently for different object classes.

Answer: True

16. Encapsulation means "many forms." Applied to object-oriented techniques, it means that the same named behavior may be completed differently for different object classes.

Answer: False Rationale: Polymorphism means "many forms." Applied to object-oriented techniques, it means that the same named behavior may be completed differently for different object classes.}

17. Use case diagrams graphically depict the interactions between the system and external systems and users. In other words, they graphically describe who will use the system and in what ways the user expects to interact with the system.

Answer: True

18. Activity diagrams depict the sequential flow of a use case or business process.

Answer: True

19. Class diagrams depict the system's object structure. They show object classes that the system is composed of as well as the relationships between those classes.

Answer: True

20. There are thirteen diagrams used in UML 2.0.

Answer: True Page: 381

21. The current version of UML is 3.0.

Answer: False Rationale: The current version of UML is 2.0.

22. The UML does not prescribe a method for developing systems – only a notation for modeling.

Answer: True

Page 4: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

23. Class diagrams model how events can change the state of an object class over its lifetime.

Answer: False Rationale: This describes State Machine diagrams.

24. A subtype can have a behavior with the same name as a behavior in it's supertype.

Answer: True

25. The only way to access or change an object's attributes is through that object's behaviors.

Answer: True

26. If exam is an object class, then your exam paper is an object instance.

Answer: True

27. An object class can be referred to simply as a class.

Answer: True

28. A Student object class and a Teacher object class would have a supertype/subtype relationship.

Answer: False Page: 373-375 Rationale: Both Student and Teacher would be subtypes of a Person object class.

29. The concept of multiplicity is essentially the same concept as cardinality in data modeling

Answer: True

30. In UML 2.0 the notation for composition has been dropped.

Answer: False Rationale: In UML 2.0 the notation for aggregation has been dropped.

31. Composition is drawn with a filled diamond.

Answer: True

Page 5: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

32. One of the UML 2.0 diagrams is the collaboration diagram.

Answer: False Rationale: The collaboration diagram was renamed the communication diagram in UML 2.0.

33. The UML version 1.0 was released in 1997.

Answer: True

34. An activity diagram can be used to model logic with the system.

Answer: True

35. A student object class might have a behavior called withdrawFromUniversity.

Answer: True

36. A student object class might have am attribute called withdrawFromUniversity.

Answer: True Rationale: That would be a behavior, not an attribute.

37. Multiplicity is the minimum and maximum number of occurrences of one object class for a single occurrence of the related object class.

Answer: True

38. Aggregation is a stronger form of composition.

Answer: False Rationale: Composition is a stronger form of aggregation.

39. In an e-commerce information system the relationship of a shopping cart object class to a shopping cart item object class would be a generalization/specialization.

Answer: False Rationale: It would a composition relationship.

Page 6: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

40. In object-oriented analysis, the requirements use-case model is used as is.

Answer: False Page: 383 Rationale: The requirements use-case model is refined into an analysis use-case model.

41. Once all the requirements use cases have been reviewed and approved by the users, each use case will be refined to include more information to specify the system functionality in detail. The resulting use cases are called analysis use cases and should represent any implementation specifics.

Answer: False Page: 383 Rationale: The analysis use cases should still be implementation independent.

42. A use case may contain complex functionality consisting of several steps that are difficult to understand. To simplify the use case and make it more easily understood, we could extract the more complex steps into their own use cases. This type of use case is called an extension use case in that it extends the functionality of the original use case.

Answer: True

43. An abstract use case represents a form of "reuse."

Answer: True

44. An abstract use case is available for referencing (or use) by any other use case that requires its functionality.

Answer: True

45. New use cases may be added during object-oriented analysis.

Answer: True

46. New actors may be added to a use-case diagram during object-oriented analysis.

Answer: True Page: 383

47. In composition, the "whole" is responsible for the creation and destruction of its parts.

Answer: True

Page 7: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

48. A class is said to be persistent if it outlives the execution of a program.

Answer: True

49. The steps of a use case can be modeled with an activity diagram.

Answer: True Page: 390

50. An activity diagram begins with an initial node.

Answer: True Page: 391

51. At least one activity diagram can be constructed for each use case.

Answer: True Page: 391

52. To specify who does what, you can divide an activity diagram into flows.

Answer: False Page: 391 Rationale: To specify who does what, you can divide an activity diagram into partitions.

53. Every flow on an activity diagram needs words to identify them.

Answer: False Page: 391 Rationale: Most flows do not need words to identify them unless coming out of decisions.

54. On an activity diagram all actions coming into a fork must be completed before processing continues.

Answer: False Page: 391 Rationale: On an activity diagram all actions coming into a join must be completed before processing continues.

55. On an activity diagram a subactivity indicator indicates a separate activity diagram.

Answer: True Page: 391

56. A system sequence diagram depicts the interaction between an actor and the system for a use case scenario.

Answer: True Page: 394

Page 8: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

57. In a system sequence diagram lifelines indicate the period of time when the participant is active in the interaction.

Answer: False Page: 394 Rationale: Activation bars indicate the period of time when the participant is active in the interaction

58. In a system sequence diagram an input message called finalizeOrder would be proper according to UML convention.

Answer: True Page: 394

59. In a system sequence diagram a frame can show loops or optional steps.

Answer: True Page: 395

60. An object association matrix is a tool for prioritizing use cases.

Answer: False Page: 400 Rationale: An object association matrix is a tool for determining object class relationships.

61. Every object class should have a primary key attribute identified.

Answer: False Rationale: There is no need in a class diagram to include a primary key attribute unless it is a real business attribute.

62. There is no need for foreign keys in a class diagram.

Answer: True

Multiple Choice Questions

63. The data associated with an object are called: A) behaviors B) attributes C) inheritance D) encapsulation E) polymorphism

Answer: A

Page 9: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

64. In object-oriented analysis we evolve the requirements use case model into the analysis use-case model by performing the following steps: A) identify, define and document new actors B) identify, define and document new use cases C) .identify any reuse possibilities D) refine the use case model diagram E) all of these

Answer: E Page: 383

65. The messages of a use case can be graphically depicted with a(n): A) system analysis use case B) use case diagram C) activity diagram D) system sequence diagram E) none of these

Answer: D Page: 394

66. In an activity diagram you would combine flows that were previously separated by decision using a(n): A) merge B) fork C) join D) connector E) none of these

Answer: A Page: 391

67. If an object class outlives the execution of the program, it is said to be: A) permanent B) transient C) persistent D) an instance E) none of these

Answer: C

Page 10: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

68. Which of the following people were not involved in developing object-oriented analysis? A) Grady Booch B) E.F. Codd C) Ivar Jacobson D) James Rumbaugh E) all of these were involved in developing object-oriented analysis

Answer: B Page: 370-371

69. A set of modeling conventions that is used to specify or describe a software system in terms of objects is: A) data flow diagrams B) object flow diagrams C) attribute object diagrams D) unified modeling language E) none of these

Answer: D

70. The packaging of an object with its behaviors is called: A) behaviors B) attributes C) inheritance D) encapsulation E) polymorphism

Answer: D

71. Those things that an object can do and that correspond to functions that act on the object's data (or attributes) is known as a(n): A) method B) behavior C) operation D) service E) all of these

Answer: E

Page 11: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

72. Which type of class relationship can be described as "is part of" or "is composed of"? A) generalization/specialization B) association C) aggregation D) multiplicity E) inheritance

Answer: C

73. The condition where the methods and/or attributes defined in an object class can be inherited or reused by another object class is known as: A) encapsulation B) generalization C) inheritance D) specialization E) none of these

Answer: C

74. A technique wherein the attributes and behaviors are common to several types of object classes are grouped into their own class, called a supertype, is known as: A) encapsulation B) generalization C) inheritance D) generalization/specialization E) none of these

Answer: D

75. An object class whose instances inherit some common attributes from a class supertype and then add other attributes that are unique to its instances is known as: A) a supertype B) a subtype C) a behavior D) a message E) none of these

Answer: B

Page 12: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

76. What defines how many instances of one object class can be associated with one instance of another object class? A) associativity B) multiplicity C) relationship D) inheritance E) none of these

Answer: B

77. Diagrams that depict the system's object structure and show object classes that the system is composed of as well as the relationships between those object classes are known as: A) use case diagrams B) class diagrams C) object diagrams D) sequence diagrams E) none of these

Answer: B

78. Which type of class relationship can be described as "is a"? A) generalization/specialization B) association C) aggregation D) multiplicity E) inheritance

Answer: A

79. In a Class Diagram a multiplicity of zero or more would be designated by: A) 0..* B) 0-* C) a crow's foot D) a 0 and a vertical line E) none of these

Answer: A Page: 377

Page 13: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

80. Which kind of diagram shows aggregation? A) activity diagram B) class diagram C) system sequence diagram D) class relationship diagram E) none of these

Answer: A

81. In a system sequence diagram, the system is depicted as: A) a single box B) one or more rounded rectangles C) lifelines D) object classes E) none of these

Answer: A Page: 394

82. Which of the following can NOT be shown in a system sequence diagram? A) a receiver actor B) loops C) optional steps D) object classes E) system outputs

Answer: C Page: 394-395

83. Which of the following can NOT be shown in an activity diagram? A) decisions B) concurrent actions C) actors D) UML convention for messages E) none of these

Answer: C Page: 391

Page 14: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

84. Which of the following messages uses proper UML notation? A) Item Selections B) ItemSelections(items, quantities) C) ItemSelections(Items, Quantities) D) itemSelections(items, quantities) E) Itemselections(ITEMS,QUANTITIES)

Answer: C Page: 394

Fill in the Blank Questions

85. The use case _____________________________ is used to textually describe the sequence of steps of each interaction.

Answer: narrative

86. ________________________ diagrams depict the system's object structure. They show object classes that the system is composed of as well as the relationships between those classes.

Answer: Class

87. _____________________________ diagrams depict the interaction between an actor and the system for a use case scenario.

Answer: System sequence Page: 394

88. __________________________________ diagrams graphically depict how objects interact with each other via messages in execution of a use case or operation. They illustrate how messages are sent and received between objects and in what sequence.

Answer: Sequence

89. ___________________________________ are set over the lifelines in a system sequence diagram to indicate the period of time when the participant is active in the interaction.

Answer: Activation bars Page: 394

Page 15: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

90. A behavior in a subtype is said to _____________ a behavior with the same name in its supertype.

Answer: override

91. In an activity diagram the diamond shape is used to represent a __________ or a ____________.

Answer: decision, merge Page: 391

92. In an activity diagram a rake symbol is used to represent a ______________________.

Answer: subactivity indicator (action broken out in another activity diagram) Page: 391

93. In an activity diagram a black bar with tow or more flows coming in an one flow going out is called a ________________.

Answer: join Page: 391

94. To show who does what in an activity diagram you would divide it into _____________.

Answer: partitions (swimlanes) Page: 391

95. To show loops in a system sequence diagram you would use a _____________.

Answer: frame Page: 395

96. _____________________________. is a relationship in which one larger "whole" class contains one or more smaller "parts" classes.

Answer: Aggregation (or composition)

97. If an object class called Supplier has a behavior called sendEmail and an object class called Customer has a behavior called sendEmial, that is an example of ___________________.

Answer: polymorphism

Page 16: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

98. The version of the use case created during requirements analysis is called a(n) ______________________ use case.

Answer: requirements Page: 383

99. If Supplier was an object class, supplier phone number would be a(n) __________________.

Answer: attribute

100. A use case may contain complex functionality consisting of several steps that are difficult to understand. To simplify the use case and make it more easily understood, we could extract the more complex steps into their own use cases. This type of use case is called a(n) ______________________________ use case in that it extends the functionality of the original use case.

Answer: extension

101. A(n) ________________________________ use case can be invoked only by the use case it is extending.

Answer: extension

102. A(n) ___________________________ use case is used to define a use case that has a sequence of common steps that can be used by other use cases. It represents a form of "reuse."

Answer: abstract

103. ___________________ is a stronger form of __________________.

Answer: Composition, aggregation

104. _________________________________ is a type of association that is often referred to as a whole/part relationship..

Answer: Aggregation (composition)

105. An object class is said to be ______________________________ if it outlives the execution of a program.

Answer: persistent

Page 17: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

106. When a class is persistent, it means the objects the class describes will be stored in a _____________________________________.

Answer: database

107. Object classes that are created temporarily by a software program are called ______________________.

Answer: transient objects

108. UML 1.0 was released in the year _________.

Answer: 1997

109. ___________________________________ techniques are used to (1) study existing objects to see if they can be reused or adapted for new uses; and (2) define new or modified objects that will be combined with existing objects into a useful business computing application.

Answer: Object-oriented analysis (OOA)

110. ____________________________ is a technique for identifying objects within the systems environment and the relationships between those objects.

Answer: Object modeling Page: 360

111. The _________________________________________ is a set of modeling conventions that is used to specify or describe a software system in terms of objects.

Answer: Unified Modeling Language (UML)

112. A(n) ______________________________ is something that is, or is capable of being seen, touched, or otherwise sensed, and about which users store data and associate behavior.

Answer: object

113. _______________________________ are the data that represent characteristics of interest about an object.

Answer: Attributes

Page 18: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

114. _________________________ refers to those things that the object can do and that correspond to functions that act on the object's data (or attributes). This is commonly referred to as a method, operation or service.

Answer: Behavior

115. _________________________________ is the packaging of several items together into one unit. It is also called information hiding.

Answer: Encapsulation

116. A(n) ___________________________ is a set of objects that share the same attributes and behavior. It is sometimes referred to as an object class.

Answer: object class

117. ___________________________________ means that methods and attributes defined in an object class can be inherited or reused by another object class.

Answer: Inheritance

118. ___________________________________ is a technique wherein the attributes and behaviors that are common to several types of object classes are grouped into their own class, called a supertype. The attributes and methods of the supertype object class are then inherited by those object classes.

Answer: Generalization/specialization

119. A(n) _______________________________ is an object whose instances store attributes that are common to one or more class subtypes of the object.

Answer: supertype

120. A(n) _____________________________ is an object class whose instances inherit some common attributes from a class supertype and then add other attributes that are unique to an instance of it.

Answer: subtype 121. A(n) ________________________________________ is a natural business

association that exists between one or more object/classes.

Answer: object class relationship Page: 376

Page 19: sophiasapiens.chez.comsophiasapiens.chez.com/informatique/System-Analysis-and... · Web viewChapter 10 Object-Oriented Analysis and Modeling using UML True/False Questions 1.Object-oriented

122. ___________________________________ defines how many instances of one object/class can be associated with one instance of another object/class.

Answer: Multiplicity

123. A(n) __________________________________ is passed when one object invokes one or more of another object's methods (behaviors) to request information or some action.

Answer: message

124. _____________________________________ means "many forms." Applied to object-oriented techniques, it means that the same named behavior may be completed differently for different objects/classes.

Answer: Polymorphism

125. __________________________ diagrams depict the sequential flow of activities of a use case or business process

Answer: Activity