Chapter 1 Flashcards
What 2 things do Software Objects have?
Information (Attributes), Operations (Services)
What does an object diagram display?
Shows the objects attribute names and values
What does a class consist of?
A group of objects that have the same kind of information and offer the same services.
What does a class diagram display?
Shows the attributes and services that make up the class.
Name 3 types of errors and an example of each.
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.
What is the algorithm for managing syntax errors
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
What 3 tasks can software objects perform?
- Maintain information
- Answer questions about its information
- Change its information
What does a querie do?
Asks a question about an objects attributes
What does a command do?
Changes the objects attributes
What does instantiated mean?
An object is an instance of a class, therefore when we create an object it has been intantiated
What are declaration statements?
Declare a variable.
What is encapsulation?
The property of not changing unless an explicit message is received.