ssd3 Multiple-Choice Quiz 2

    技术2024-10-26  24

     1.

    UML class diagrams can describe which of the following?

    The internal structure of classes Relationships between classes

    (a) I and II (b) None (c) II only (d) I only

    Answer: a

    I.  UML类图能表达出类的内部结构,如:类名,属性,方法。

    II. UML类图能表达类与类之间的关系。

     


    2.

    In a UML class diagram's representation of a class, the top, middle, and lower rectangular compartments respectively describe the _____ of the class.

    (a) attributes, methods, and name (b) attributes, methods, and constants (c) name, attributes, and methods (d) name, methods, and constants

    Answer:c

    top:类名

    middle:属性

    lower:方法

     


    3.

    A collection typically models a _____ relationship.

    (a) one-to-one (b) zero-to-one (c) many-to-many (d) one-to-many

    Answer:d

    集合是一对多的关系。

     


    4.

    A relationship that exists between two specific instances of an object is known as a(n)

    (a) aggregation (b) specialization (c) association (d) link

    Answer:d

    排除法。一个对象的两个特例之间不可能是aggregation,specialization,association三种关系中的任何一种。

     


    5.

    Consider the following UML class diagram.

    According to the diagram, which of the following statements is true?

    (a) ClassA and ClassB each contain at least one reference to an instance of ClassC. (b) ClassB and ClassC are both subclasses of ClassA. (c) ClassA is composed of one instance of ClassB and one or more instances of ClassC. (d) ClassB has a one-to-one association with ClassA and a one-to-many association with ClassC.

    Answer:c

    classA由一个类B的实例和一到多个类C的实例组成。

     


    6.

    Consider the following UML class diagram.

     The diagram describes a

    (a) class without methods (b) relationship between a subclass and a superclass (c) one-to-one relationship (d) self-containing class

    Answer:d

    classA被自我所包含。


    7.

    Which of the following is true about association and aggregation in UML class diagrams?

    (a) Association and aggregation have no meaningful relationship. (b) Association is a special form of aggregation. (c) Association is the opposite of aggregation. (d) Aggregation is a special form of association.

    Answer:d

    聚合(Aggregation)是联合(association)的一种特殊形式。

     


    8.

    Consider the following UML class diagram.

    Which of the following is (are) true about the system described by the diagram?

    An instance of Picture can contain a collection of instances of the class Shape. An instance of Shape can contain a collection of instances of the class Picture.

    (a) None (b) I only (c) II only (d) I and II

    Answer:b

    I.  An instance of Picture can contain a collection of instances of the class Shape.

    II. An instance of Shape can contain no more than one instance of the class Picture.


    9.

    The static model of a software system typically includes which of the following?

    Attributes of classes Actions that occur between classes Structural relationships between classes

    (a) II and III only (b) I and III only (c) I, II, and III (d) I and II only

    Answer:b

    静态模型没有包括类之间发生的行为。


    10.

    An object model describes which of the following?

    Attributes of classes Methods of classes Relationships between classes

    (a) I, II, and III (b) I and II only (c) II and III only (d) I and III only

    Answer:a

    对象模型描述的既有类属性,又有类方法,还有类与类之间的关系。

    最新回复(0)