Latest Updates
The Java == operator performs the same function as the = operator ANS false
Method overloading distinguishes between methods based on ____.
1. argument count only
2. num of lines of code
3. none of these
4. use of loops ANS None.
num of arguments and data types of arguments
a value type variable can store a null reference in java ANS false.
reference type can.
in Java an expression like the one below will evaluate to ___. new Bunny("Flopysy", 8) ANS an object
reference
Which object oriented element best allows us to designing and implementing families of related types that
share outward similarities, but have specialized behaviors? ANS Polymorphism
We can more easily debug a program when the responsibilities are well encapsulated ANS true
During what activity do we directly analyze the language of the problem to identify objects, their attributes,
and their behaviors?
1. noun/verb analysis
2.problem description
3.class outlining
4. use case diagramming
5. none of these ANS 1. Noun/verb analysis
, Encapsulation is about assigning responsibilities to objects ANS True
(encapsulation abstracts the variables so the user can deal with just the objects. )
(get and set methods)
Responsibilities that are very closely related can and should generally be assigned to a single class ANS
true
operations are things an object ____ ANS does
an object's operations are implemented as ________ ANS methods
an object is an instance of a class. ANS true
an object's attributes are implemented as _______. ANS variables
an object and the variable that refers to it are two different things ANS true
which object oriented element is used to define "is a " relationship? ANS inheritance
Whenever one class inherits another class, it is called an IS-A relationship.
Has-A relationship: Whenever an instance of one class is used in another class, it is called HAS-A relationship.
1. in general, data hiding means that an object keeps what it knows private.
2. the benefit of data hiding is: we can make an object truly responsible for what it knows and what it does
ANS 1. true
2. true
data hiding used as security such that no internal data will be accessed without authentication.
a name defined in an outer scope is not available in all blocks nested inside that scope ANS false