Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

CS 328 Midterm Exam Student Name: Student ID (Last 4 digits):-- II. For each of

ID: 3725946 • Letter: C

Question

CS 328 Midterm Exam Student Name: Student ID (Last 4 digits):-- II. For each of the following pairs of classes, identify the relations. Briefly explain why or why not. (10 points) (1o points) UM Relations Pair of classes Dining philosopher and a Relations fork A word file and a pdf file A polygon and a set of edges A baseball team and a player in the team Vehicle and an airplane III. True/False (10pts) 1. An association is a description of a group of links with common behaviors and semantics 2. An association is a logical construct, of which a reference is a generalization alternative 3. Multiplicity specifies the number of instances of one object. 4. An association class is an association that is also a class. 5. An association class may have attributes, operation and participant in associations. 6. A qualified associstion is an association in which the objects in a "many" generalization are partially disambiguated by a qualifier. 7. Generalization is an important construct for both conceptual modeling and implementation. S. During conceptual modeling, aggregation lets the developer organize the class on the basis 9. Inheritance may occur across an arbitrary number of levels, where each level represents one 10. 00 development not only lets you share information within an application, but also offers of similarities aspect of an object. the prospect of reusing designs and code on future projects.

Explanation / Answer

II)-----------------------------------------------------------------------------------------------------------------------------------------------------

a) Aggregation because fork is a part of dining philospher.

b) Binding, becuase assign same value but generates a new model element.

c) Abstraction,because same concept at different levels of abstraction or from different viewpoints.

d) Composition,because specifies that the player is the part classifier is dependent on the, team is the whole classifier.

e) Realization,A realization relationship exists between two model elements when one of them must realize, or implement, the behavior that the other specifies.

III)--------------------------------------------------------------------------------------------------------------------------------

1) false,that encompasses just about any logical connection or relationship between classes.

2) true A generalization relationship indicates that a specialized (child) model element is based on a general (parent) model element.

3)false ,generalazation ->one fleet may include multiple airplanes, while one commercial airplane may contain zero to many passengers.

4) true,  that encompasses just about any logical connection or relationship between classes.

5)true,any logical connection or relationship between classes.and classes may have all.

6)true, A qualified association has a qualifier that is used to select an object (or objects) from a larger set of related objects, based upon the qualifier key. Informally, in a software perspective, it suggests looking things up by a key, such as objects in a HashMap.

7)true, relationship wherein one associated class is a child of another by virtue of assuming the same functionalities of the parent class.

8)true,  formation of a particular class as a result of one class being aggregated or built as a collection.

9)false,  inheritance is a relationship wherein one associated class is a child of another by virtue of assuming the same functionalities of the parent class.

10)true,Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.