Week 2 Flashcards
A _____ is a program unit that houses the set of methods that perform the _______ tasks
Class, classes
T/F - A constructor is a special method of a class
True
Class fields and methods are called
(Not instance variables)
properties and methods
Properties and methods in an object are referred to as
Instance properties and methods
What is the automatic process that happens in java when objects are no longer needed, and are therefore deleted from memory?
Garbage collection
3 advantages of reusing existing classes
- Saves time
- Can create reliable and effective systems (as the classes will have undergone extensive testing, debugging, performance tuning)
- Reusable classes are important to the software revolution started by objec tech.
Messages can be sent to an ______
object
Each _______ is implemented as a method call which informs a method of the object to perform its task
message
T/F - An object knows its own attributes, but not the attributes of other objects
True
What is encapsulation? What is it done by?
Information hiding. Done by classes and their objects
T/F - Objects cannot communicate with each other
False.
T/F - Objects are not allowed to know how other objects are implemented
True
How are implementation details often hidden with objects?
They’re declared private
T/F - Information hiding is crucial to good software engineering
True
What is it called when a subclass starts with the characteristics of an existing class called the superclass?
Inheritance