MCQ Bank
Identifying Whole-Part structures (Aggregations) means what are my _________
- A) Methods
- B) Components
- C) Attributes
- D) Messages
In Object oriented design, combining the services offered by an object with the attributes they work on, results in:
a. Lower coupling and stronger cohesion
b. Lower cohesion and stronger coupling
c. Increased likelihood of reuse
d. Decreases the modularity of the system
- A) b and c
- B) a only
- C) a and c
- D) b and d
"A car is made up of a body, three or four wheels, a steering mechanism, a breaking mechanism, and a power-engine"
The above statement is example of:
- A) Inheritance
- B) Specialization
- C) Whole-Part relationship
- D) Generalization
A _____ relationship indicates that one entity is composed of one or more parts which are themselves instances of that or another entity.
- A) Whole-part
- B) Inheritance
- C) Generalization
- D) Specialization
Sequence diagrams:
- A) Provide the static behavior
- B) Provide parallel data flow
- C) Provide a time-based view
- D) Provide Data Flow
An architectural style encompasses which of the following elements?
- A) Set of Components and Constraints
- B) Semantic Models and Constraints
- C) Set of Components and Semantic Models
- D) Constraints, Set of Components and Semantic Models
In multiprocessing applications, different execution threads may pass information to one another by sending _____________________ to each other.
- A) Asynchronous messages
- B) System calls
- C) Synchronous messages
- D) Interrupt calls
Comma ( , ) is very dangerous because ____________
- A) Compiler does not recognise this symbol
- B) It does not causes side effects
- C) It creates linkage problem
- D) It causes side effects
If an application fulfills its specifications but deviates from users expectations or their desired behavior. This means, software is verified but not ------------
- A) Corrected
- B) Checked
- C) Validated
- D) Traced
Floating point constants should always be written with decimal point and at least
- A) none of the given
- B) two decimal
- C) one decimal
- D) three decimal
Variables should be initialized where they are ------and they should be declared in the ------scope possible.
- A) defined and medium
- B) declared and smallest
- C) declared and medium
- D) defined and smallest
The complexity of a program may ______ if there are exceptional paths in it
- A) Cutback
- B) Decrease
- C) Remain same
- D) Increase
The form for (;;) should be used for
- A) nested loop
- B) more than 1000 iterations
- C) empty loop
- D) less than 1000 iterations
In case of header files, construction is to avoid ------ errors. The construction should appear in the top of the file (before the file header).
- A) logical
- B) All of the given
- C) compilation
- D) run time
A self documenting code is a code that explains itself without the need of comments and extraneous documentation, like _______
- A) Process-flow state diagrams
- B) Flowcharts
- C) UML diagrams
- D) All of the given choices
STL Stnads for ------------------
- A) Standard Tempo Line
- B) Standard Template Library
- C) Standard Type Link
- D) Standard Type Link
In order to write a portable code which of the following guideline will not be helpful:
- A) Stick to the standards
- B) Size of data types
- C) Using vendor specific language extensions
- D) Program in the mainstream
It ensures that a class only has one instance and provides a global point of access to it.
- A) Singleton Pattern
- B) Observer Pattern
- C) Real Pattern
- D) None of the given
Which one of these is a correct short cut used by the programmer?
- A) x*a=
- B) x*=a
- C) =a*x
- D) x=*a
Identifier names also play a significant role in enhancing the -------- of a program.
- A) All of the given choices
- B) Reliability
- C) Readability
- D) Writ ability