What does OOP stand for?
Object Oriented Programming
What is the difference between C++ and Java with regards to OOP?
C++ can be written without using any type of OOP. Java on the other hand revolves around OOP
OOP incorporates what 3 features?
encapsulation, polymorphism, inheritance
How does OOP simulate real life?
by using a program style that treats a program as a group of objects
What do attributes store?
store program information
Refer to the previous question. What do methods do with this?
perform some actions on the information
The significance of OOP is that _____________ and _____________ are packaged in the same container.
attributes and methods
What is the intention of encapsulation?
is to make a program more reliable
What are object members that perform some task called?
methods
What are object members that store data called?
attributes
The process of placing data attributes and the action methods that access the data in the same container is called _____________.
encapsulation
Programs in the past and today have one common goal that allows no compromise. What is that goal?
reliability
In structured programming, program flow is strictly controlled with how many entrances and exits?
one entrance and one exit
Which is easier to create, class methods or object methods?
class methods
When you use object methods, what operator must be used to create a new object?
new
operator
Is it possible to construct an object when the class is totally empty?
Yes
Members in a class need to be declared as _____________ or _____________.
private
or
public
Questions 18 - 19 refer to your answers to question 4.
Which of these would you use to declare a class member if you do not want it to be accessible outside of the class?
private
Which of these would you use to declare a class member if you do want it to be accessible outside of the class?
public
Which of these would you usually use to declare data attributes of a class?
private
Which of these would you usually use to declare class methods?
public
In the statement: Bank tom = new Bank(); which "Bank" is the class name?
tom
Refer to the previous question. What is the other "Bank()"?
it has parentheses, which right away indicates that this is a method call
The reliability of the constructor is based on what?
on the fact that the constructor method is called automatically
A _____________ is a template that can form many objects.
class
An object is a single variable _____________ of a class.
instance
The creation of an object can also be called what?
instantiation of an object
construction of an object
The special method that is called during the instantiation of an object is called a _____________.
constructor
What are get methods?
Such methods get values. They are read-only methods, because data values are accessed, but not altered
Can a class have more than one constructor?
Yes
Multiple methods with the same identifier are called _____________ methods.
overloaded methods
What is the primary purpose of a constructor?
is to initialize all the
attributes of newly created object.
How do you know that a particular method is a constructor?
Constructors have the same identifier as the class.
Are constructors void or return methods?
Constructors are neither void methods nor return methods.
Are constructors declared public or private?
public
In this sentence: "The method identifier can be the same, but the method signature must be different."
What is meant by the word signature?
parameter list
What kind of constructor has no parameters?
default constructor.
Look at programs Java0809.java and Java0810.java.
How are the 2 withdrawing methods improved in the latter program?
figure 8.9, continues adding methods. In this case two additional methods are added to withdraw money from the checking or savings account. Program Java0810.java in figure 8.10 improves the 2 withdrawal methods so that overdraft is prevented.
If you are using good program design, every class should be placed where?
place each class in its own file
Using the reserved word static at the start of a method heading indicates that the method is a what?
class method
Object methods are sometimes called _______ methods .
non-static
Object methods are meant to be used in what situations?
situations where multiple objects of a class must be constructed
How are object methods called?
object identifier
Are the majority of method declared public or private?
public
What is another word for a private method?
helper methods
What is the difference between a void method and a return method?
Void methods do not return a value while Return methods are methods that return a value
The term default constructor has 2 different meaning. What are they?
What do you call the second or third constructor in a class?
A constructor is a special method that is automatically called during the instantiation of a new object or no-parameter constructor;overloaded constructor
What is another word for a get method?
accessing methods
What are three other words for a set method?
Altering methods, modifier methods, mutator methods
What is the difference between a get method and a set method?
These are methods that not only access the private data of an object; they also alter the value of the data