CS 151 Previous Quiz Questions With
Complete Solutions
Pick all true statements in OOP.
A. Paradigm is a way for modeling and representing of the entities and their interaction
B. In object-oriented paradigm, we model the entities of the real universe by "Objects"
C. Behavior of an object is the set of the operations (or services) that object can do (or
give).
D. Identity of an object is the name we give to it. - ANSWER A, B, & C
The JVM gives the object its identity.
Pick all that are class members in OOP?
A. Instance variables
B. Interface
C. Methods
D. None are correct - ANSWER A & C
Interface of a class is all members that can be seen from outside of a class. (TRUE/FALSE)
- ANSWER TRUE
,An object is an entity that has 3 properties: state, behavior, and identity (TRUE/FALSE) -
ANSWER TRUE
UML stands for? - ANSWER Unified Modeling Language
What is the definition of an object? - ANSWER Objects are instance variables that store a
piece of information; it has 3 properties: state/"instance variable", behavior/"method",
and identity
What is the definition of "state" of an object? - ANSWER The state of an object is the set
of values of attributes at any given moment
What is the definition of "class" in OOP? - ANSWER An abstraction of similar objects
What is the definition of API? - ANSWER Application Programming Interface. An API of a
class is something that can be seen by other classes
Interface of a class is whatever can be seen outside of class - ANSWER TRUE
Which one is class member in OOP?
A. Instance variables
B. Attributes
,C. Methods
D. None of the above - ANSWER A, B & C
Which one is correct about functional spec?
A. None of them are correct.
B. It describes how to solve the problem.
C. Basically, it describes the required features.
D. B and C are correct. - ANSWER C
B refers to a Technical spec
Pick the best answer:
A. None is correct
B. Problem statement describes how we should solve the problem.
C. Theoretically, problem statement is a clear description of the problem.
D. B and C are correct. - ANSWER C
B refers to a Technical spec
Objects are the instances of their classes.(TRUE/FALSE) - ANSWER TRUE
, Classes are abstractions of objects
Pick all true statement in OOP.
A. Paradigm is a method for modeling and representing of the entities and their
interactions.
B. In object-oriented paradigm, we model the entities of the real universe by "Objects".
C. Behavior of an object is the set of the operations (or services) that object can do (or
give).
D. Identity of an object is the name we give to it. - ANSWER A, B & C
In Java terms, the "identity" is an internal name given by the JVM
An object is an entity that has 3 properties: state, behavior, and name. (TRUE/FALSE) -
ANSWER FALSE
"Name" is the name that you the user gives to something in general (e.g. naming your
dog). However, the correct property of an object is referred to as an "identity", referring
to the identity given by the JVM and not the user
API and Interface of a class are the same thing. (TRUE/FALSE) - ANSWER TRUE
API = Application Programming Interface
Complete Solutions
Pick all true statements in OOP.
A. Paradigm is a way for modeling and representing of the entities and their interaction
B. In object-oriented paradigm, we model the entities of the real universe by "Objects"
C. Behavior of an object is the set of the operations (or services) that object can do (or
give).
D. Identity of an object is the name we give to it. - ANSWER A, B, & C
The JVM gives the object its identity.
Pick all that are class members in OOP?
A. Instance variables
B. Interface
C. Methods
D. None are correct - ANSWER A & C
Interface of a class is all members that can be seen from outside of a class. (TRUE/FALSE)
- ANSWER TRUE
,An object is an entity that has 3 properties: state, behavior, and identity (TRUE/FALSE) -
ANSWER TRUE
UML stands for? - ANSWER Unified Modeling Language
What is the definition of an object? - ANSWER Objects are instance variables that store a
piece of information; it has 3 properties: state/"instance variable", behavior/"method",
and identity
What is the definition of "state" of an object? - ANSWER The state of an object is the set
of values of attributes at any given moment
What is the definition of "class" in OOP? - ANSWER An abstraction of similar objects
What is the definition of API? - ANSWER Application Programming Interface. An API of a
class is something that can be seen by other classes
Interface of a class is whatever can be seen outside of class - ANSWER TRUE
Which one is class member in OOP?
A. Instance variables
B. Attributes
,C. Methods
D. None of the above - ANSWER A, B & C
Which one is correct about functional spec?
A. None of them are correct.
B. It describes how to solve the problem.
C. Basically, it describes the required features.
D. B and C are correct. - ANSWER C
B refers to a Technical spec
Pick the best answer:
A. None is correct
B. Problem statement describes how we should solve the problem.
C. Theoretically, problem statement is a clear description of the problem.
D. B and C are correct. - ANSWER C
B refers to a Technical spec
Objects are the instances of their classes.(TRUE/FALSE) - ANSWER TRUE
, Classes are abstractions of objects
Pick all true statement in OOP.
A. Paradigm is a method for modeling and representing of the entities and their
interactions.
B. In object-oriented paradigm, we model the entities of the real universe by "Objects".
C. Behavior of an object is the set of the operations (or services) that object can do (or
give).
D. Identity of an object is the name we give to it. - ANSWER A, B & C
In Java terms, the "identity" is an internal name given by the JVM
An object is an entity that has 3 properties: state, behavior, and name. (TRUE/FALSE) -
ANSWER FALSE
"Name" is the name that you the user gives to something in general (e.g. naming your
dog). However, the correct property of an object is referred to as an "identity", referring
to the identity given by the JVM and not the user
API and Interface of a class are the same thing. (TRUE/FALSE) - ANSWER TRUE
API = Application Programming Interface