Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
javaСЎФсМв_115.doc
Скачиваний:
0
Добавлен:
01.05.2025
Размер:
101.38 Кб
Скачать

109. Consider the following uml class diagram.

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

I .ClassB is a specialization of ClassA.

II .ClassA is a generalization of ClassC.

III .ClassC is involved in a self-containment loop.

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

110. Consider the following Java program segment.

public class Foo {

public static int x;

}

If two separate Foo objects are instantiated, x is created in memory _____ time(s) because it is a _____ variable.

(a) one, class (b) one, instance (c) two, instance (d) two, class

111. Consider the following uml class diagram.

The diagram describes a

(a) relationship between a subclass and a superclass (b) one-to-one relationship

(c) self-containing class (d) class without methods

112. If a class has an association with itself, then the class contains

(a) a method that calls another method within the same class

(b) an attribute that references an object of the same class

(c) a method that calls itself (d) its own superclass

113. In an object model, the data that an object is responsible for maintaining are represented by

(a) attributes (b) methods (c) specializations (d) generalizations

114. An object model describes which of the following?

I .Attributes of classes

II .Methods of classes

III .Relationships between classes

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

115. Which of the following Java method declarations does not require that the method return a value? (a) private int myMethod(); (b) private static int myMethod();

(c) public String myMethod(); (d) public void myMethod();

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]