set-9
415. Which would you use if you wanted a relatively permanent connection between sender & receiver objects?
Attribute, or global
Parameter, or local
Both A and B
Only parameter
416. Which would you use if you didn’t want a permanent connection?
Parameter, or local
Attribute, or global
Both A and B
Only Attribute
417. ______ is the way to achieve global visibility.
Use a global variable in C++,
Static (or class) variable (in C++ or Java) or
The .Singleton pattern (a static method that returns the object)
All of them
418. Design class diagrams (DCD) provides details of the software classes along with ______
Parameters
Visibility
Use cases
Methods
419. A Class consists of which of these abstractions?
Set of the objects
Attributes
Operations
All of the mentioned
420. A class is divided into which of these compartments?
Name Compartment
Attribute Compartment
Operation Compartment
All of the mentioned
421. An attribute is a data item held by which of the following?
Class
Object
All of the mentioned
None of the mentioned
422. What Does a Composite name consist of in a UML Class and object diagram?
Delimiter
Simple names
Digits
All of the mentioned
423. Select which one is model static data structures.
Deployment diagram
Class diagrams
Activity diagrams
Interaction diagrams
All of the above
424. Select the diagrams that are used to explain data structures, and the static snapshots parts of the things place in the class diagrams.
Use case
Collaboration
Object
Sequence
None of these
425. ______ select from the following in which engineering and reverse engineering can be applicable
Tagged values
Stereotypes
Class diagram
Both 1 and 2
426. ______ are part of the class operation specification format?
Name
Parameter list
Return-type list
All of the mentioned
427. Which among these are the rules to be considered to form Class diagrams?
Class symbols must have at least a name compartment
Compartment can be in random order
Attributes and operations can be listed at any suitable place
None of the mentioned
428. Given this class diagram, suppose we execute the following code:
In Minivan
In Minivan or Car
In Minivan, Car, or Vehicle
In Car
In Car or Vehicle
429. Given this class diagram, suppose there is a method pass, defined in Car as
Suppose imp is an instance of Car (or one of its subtypes).
When I invoke the above method using imp.pass(pokey), what must be true of actual parameter pokey?
Its actual type is Car
Its actual type is Car, SportsCar, or Minivan
Its actual type is Car or Vehicle
It depends on the actual type of imp
None of the above
430. Given the below class diagram and code fragment, what happens?
The code compiles and executes fine
Code fails at compile time, error in line 2
Code fails at compile time, error in line 5 [correct]
Code fails at execution time, error in line 2
Code fails at execution time, error in line 5
431. Implementation in an OOP language requires writing source code for:
Class and interface definitions
Method definitions
Both A and B
None
432. Basic class definitions can be written from the design class diagrams. Which of the following information can be extracted:
Class name
Attributes: name, type and access specifier
Method: name, return type, parameters and their types, and its access specifier
All of the above
433. During the creation of methods form interaction diagram, the sequence of messages in an interaction diagram translates to a series of statements in the method definitions. Is this statement true?
Yes
No
434. One-to-many relationships are common. For example, a Sale is associated with a group of SalesLineItem objects. In OO programming languages, these relationships are usually implemented using collection objects such as Vectors, Lists, Maps, arrays and so on. In which phase these relations are maintained?
CREATING CLASS DEFINITIONS FROM DCDS
CONTAINER/COLLECTION CLASSES IN CODE
ORDER OF IMPLEMENTATION
EXCEPTIONS AND ERROR HANDLING
435. How to maintain the visibility to a group of other objects? For example, a Sale must maintain visibility to a group of SalesLineItem instances. Which phases handles these?
CREATING CLASS DEFINITIONS FROM DCDS
CONTAINER/COLLECTION CLASSES IN CODE
ORDER OF IMPLEMENTATION
EXCEPTIONS AND ERROR HANDLING
436. In order of implementation phase, Classes need to be implemented (and ideally, fully unit tested) from least-coupled to most-coupled. Is this statement true?
Yes
No
437. ______ are anomalous situations during a program's execution.
Exceptions
Errors
Delay
Noise
438. The unexpected situations that may occur during program execution are
Running out of memory
Resource allocation errors
Inability to find a file
Problems in network
All of the above
439. Every try statement should be followed by at least one catch statement; otherwise ______ will occur.
No execution
Null
Zero
Compilation error
440. State whether the following statements are True or False.
A catch can have comma-separated multiple arguments.
Throwing an Exception always causes program termination.
True, False
False, True
True, True
False, False
Last updated