Lesson A5
Next: Designing A ClassLesson Overview: This lesson discusses how to design your own classes. This can be the most challenging part of programming. A truly good design can be the difference between hundreds of hours working with complex code and two hours working in an elegant system. A well thought out design can make the programming portion far easier. In fact, for many professional projects, more time is spent designing programs than actually typing in code. Imagine a million lines of code in a project with a design flaw. Redesigning that much code could be horrendous!
(e.g. public, private) Keywords defining where a method or attribute can be accessed from.
a.k.a. fields, attributes are data stored within a class.
Definitions of things a class can do. Alternate term: method.
A method with the same name as the class, used during object creation to initialize the starting state of an object.
The practice of hiding data within a class (e.g. using the specifier private for attributes).
Stores the state of an object; while defined in a class, the data they contain belongs to individual objects.
The practice of giving a method multiple definitions (see Lesson 4D).
A watered-down representation of actual code, written by programmers to design and visualize classes and programs.
A pointer to a location in memory, such as one that stores the raw data of a variable.
The idea of starting with bigger, simpler ideas, and working down to details as progress is made.
A location in memory storing some kind of data, named by an identifier.