Computer Science Notes

Notes From CS Undergrad Courses FSU

This project is maintained by awa03

Encapsulation is provided by classes, which are the fundamental building block of object oriented programming.

Classes

- serve as a blueprint for an object - A class definition provides the function of the class

Type- what class was used to create the object Name- an identifier for the object, can be used to distinguish between one another Member Data- The state of the object Member Functions- The behavior of the object

DDU- "Declare, Define, Use"

An interface is a simplified view of a program, that allows for easier user input/output. It makes complicated tasks simpler. In other words the user should not need to understand the implementation.

We can declare member data (state) or member functions (behavior) as:

Unchecked State is Bad

Types of Member Functions

- Accessors- functions that do not change state - Mutators- are functions that do change

An example of the following are: