Chapter 1 Flashcards

1
Q

What 2 things do Software Objects have?

A

Information (Attributes), Operations (Services)

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

What does an object diagram display?

A

Shows the objects attribute names and values

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

What does a class consist of?

A

A group of objects that have the same kind of information and offer the same services.

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

What does a class diagram display?

A

Shows the attributes and services that make up the class.

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

Name 3 types of errors and an example of each.

A

1) Compile-Time error - You forget the brackets when calling a method.
2) Run-Time error - You tell the robot to move through a wall which causes the program to crash.
3) Logic error - You forget to tell the robot to turnLeft so it doesn’t end up where you want.

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

What is the algorithm for managing syntax errors

A

1) Read your program and fix as many errors as possible
2) Compile and check whether there are any errors left
3) Scan error messages from the top and fix as many as possible
4) Repeat steps 2-3 as necessary

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

What 3 tasks can software objects perform?

A
  • Maintain information
  • Answer questions about its information
  • Change its information
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does a querie do?

A

Asks a question about an objects attributes

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

What does a command do?

A

Changes the objects attributes

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

What does instantiated mean?

A

An object is an instance of a class, therefore when we create an object it has been intantiated

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

What are declaration statements?

A

Declare a variable.

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

What is encapsulation?

A

The property of not changing unless an explicit message is received.

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