Week 2 Flashcards

1
Q

A _____ is a program unit that houses the set of methods that perform the _______ tasks

A

Class, classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

T/F - A constructor is a special method of a class

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Class fields and methods are called

(Not instance variables)

A

properties and methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Properties and methods in an object are referred to as

A

Instance properties and methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the automatic process that happens in java when objects are no longer needed, and are therefore deleted from memory?

A

Garbage collection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

3 advantages of reusing existing classes

A
  1. Saves time
  2. Can create reliable and effective systems (as the classes will have undergone extensive testing, debugging, performance tuning)
  3. Reusable classes are important to the software revolution started by objec tech.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Messages can be sent to an ______

A

object

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Each _______ is implemented as a method call which informs a method of the object to perform its task

A

message

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

T/F - An object knows its own attributes, but not the attributes of other objects

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is encapsulation? What is it done by?

A

Information hiding. Done by classes and their objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

T/F - Objects cannot communicate with each other

A

False.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

T/F - Objects are not allowed to know how other objects are implemented

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How are implementation details often hidden with objects?

A

They’re declared private

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

T/F - Information hiding is crucial to good software engineering

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is it called when a subclass starts with the characteristics of an existing class called the superclass?

A

Inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Not only can they inherit, subclasses can __________ the characteristics of the superclass

A

customize

17
Q

T/F - In inheritance a new class is created by acquiring an existing class’ members and possibly enhancing them with new or modified capabilities

A

True

18
Q

Inheritance can ____ _____ during program development by basing new classes on existing proven/debugged software

A

save time

19
Q

T/F - In inheritance a new class is created by acquiring an existing class’ members and may be enhancing them with new or modified capabilities

A

True

20
Q

T/F - Inheritance increases the likelihood that a system will be implemented and maintained.

A

True

21
Q

A subclass is ____ ________ than a superclass

A

more specific

22
Q

A subclass exhibits behaviors of its superclass, but can also add

A

add behaviors that are specific to the subclass

23
Q

Inheritance is sometimes referred to as

A

specialization

24
Q

name this: the capability of a method to do different things based on the object that it is acting upon

A

Polymorphism