Software Engineering and Object-Oriented An… Set 9 | NEC Computer
Latest notices:
NEC licence exam preparation, made clearer.Practice questions, syllabus guides, and timed mocks for Nepal engineers.New study resources are added regularly.NEC licence exam preparation, made clearer.Practice questions, syllabus guides, and timed mocks for Nepal engineers.New study resources are added regularly.
Which would you use if you didn’t want a permanent connection?
A.
Parameter, or local
B.
Attribute, or global
C.
Both A and B
D.
Only Attribute
·
Question 3
______ is the way to achieve global visibility.
A.
Use a global variable in C++,
B.
Static (or class) variable (in C++ or Java) or
C.
The .Singleton pattern (a static method that returns the object)
D.
All of them
·
Question 4
Design class diagrams (DCD) provides details of the software classes along with ______
A.
Parameters
B.
Visibility
C.
Use cases
D.
Methods
·
Question 5
A Class consists of which of these abstractions?
A.
Set of the objects
B.
Attributes
C.
Operations
D.
All of the mentioned
·
Question 6
A class is divided into which of these compartments?
A.
Name Compartment
B.
Attribute Compartment
C.
Operation Compartment
D.
All of the mentioned
·
Question 7
An attribute is a data item held by which of the following?
A.
Class
B.
Object
C.
All of the mentioned
D.
None of the mentioned
·
Question 8
What Does a Composite name consist of in a UML Class and object diagram?
A.
Delimiter
B.
Simple names
C.
Digits
D.
All of the mentioned
·
Question 9
Select which one is model static data structures.
A.
Deployment diagram
B.
Class diagrams
C.
Activity diagrams
D.
Interaction diagrams
E.
All of the above
·
Question 10
Select the diagrams that are used to explain data structures, and the static snapshots parts of the things place in the class diagrams.
A.
Use case
B.
Collaboration
C.
Object
D.
Sequence
E.
None of these
·
Question 11
______ select from the following in which engineering and reverse engineering can be applicable
A.
Tagged values
B.
Stereotypes
C.
Class diagram
D.
Both 1 and 2
·
Question 12
______ are part of the class operation specification format?
A.
Name
B.
Parameter list
C.
Return-type list
D.
All of the mentioned
·
Question 13
Which among these are the rules to be considered to form Class diagrams?
A.
Class symbols must have at least a name compartment
B.
Compartment can be in random order
C.
Attributes and operations can be listed at any suitable place
D.
None of the mentioned
·
Question 14
Given this class diagram, suppose we execute the following code:
A.
In Minivan
B.
In Minivan or Car
C.
In Minivan, Car, or Vehicle
D.
In Car
E.
In Car or Vehicle
·
Question 15
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?
A.
Its actual type is Car
B.
Its actual type is Car, SportsCar, or Minivan
C.
Its actual type is Car or Vehicle
D.
It depends on the actual type of imp
E.
None of the above
·
Question 16
Given the below class diagram and code fragment, what happens?
A.
The code compiles and executes fine
B.
Code fails at compile time, error in line 2
C.
Code fails at compile time, error in line 5 \[correct]
D.
Code fails at execution time, error in line 2
E.
Code fails at execution time, error in line 5
·
Question 17
Implementation in an OOP language requires writing source code for:
A.
Class and interface definitions
B.
Method definitions
C.
Both A and B
D.
None
·
Question 18
Basic class definitions can be written from the design class diagrams. Which of the following information can be extracted:
A.
Class name
B.
Attributes: name, type and access specifier
C.
Method: name, return type, parameters and their types, and its access specifier
D.
All of the above
·
Question 19
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?
A.
Yes
B.
No
·
Question 20
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?
A.
CREATING CLASS DEFINITIONS FROM DCDS
B.
CONTAINER/COLLECTION CLASSES IN CODE
C.
ORDER OF IMPLEMENTATION
D.
EXCEPTIONS AND ERROR HANDLING
·
Question 21
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?
A.
CREATING CLASS DEFINITIONS FROM DCDS
B.
CONTAINER/COLLECTION CLASSES IN CODE
C.
ORDER OF IMPLEMENTATION
D.
EXCEPTIONS AND ERROR HANDLING
·
Question 22
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?
A.
Yes
B.
No
·
Question 23
______ are anomalous situations during a program's execution.
A.
Exceptions
B.
Errors
C.
Delay
D.
Noise
·
Question 24
The unexpected situations that may occur during program execution are
A.
Running out of memory
B.
Resource allocation errors
C.
Inability to find a file
D.
Problems in network
E.
All of the above
·
Question 25
Every try statement should be followed by at least one catch statement; otherwise ______ will occur.
A.
No execution
B.
Null
C.
Zero
D.
Compilation error
·
Question 26
State whether the following statements are True or False.
A.
A catch can have comma-separated multiple arguments.
B.
Throwing an Exception always causes program termination.