Objects and Classes Flashcards

1
Q

What are objects?

A

They’re program modules that can do actions or be acted upon by other objects.

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

What are properties and behaviours of objects?

A

Properties are data about the object, such as attributes or fields or instance variables. While behaviours are methods, like instance methods.

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

What has to happen before an instance method is called?

A

An object of that class must be called before a method of its class can be called upon it.

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

What’s an analogy for a class?

A

A template, model or definition for objects of that class.

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

Does every object belong to a specific class?

A

Yes, and objects that belong to the same class have the same properties and can perform the same actions.

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

What do Object-oriented programs consist of?

A

Interacting objects, namely objects that are defined by classes and can be created by objects of other classes (client classes). Typically used in implementing a programming solution to a problem.

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

What does a class definition consist of?

A

Attribute declarations (instance/field variables), Constructor definitions, Method definitions

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

How is a class definition stored?

A

In a file with the same name as the class and a .java extension.

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

Describe the Software Life Cycle

A
  1. Problem specification
  2. Design (algorithms and data structures)
  3. Implementation (translate design into code)
  4. Testing and debugging.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe Modular Design

A

Breaking a complex problem into smaller isolated problems, (modules). Each module contains data and code, part of a module is kept hidden from other modules to achieve independence (private and public).

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