Site hosted by Angelfire.com: Build your free website today!

Chapter 6
Home Syllabus References Chapter 5 Chapter 6 Final Project Practice Examples Class Plans

 

Base Class
Subclass

OOP: Creating Object-Oriented Programs

Classes and Instances

What is a class?

What is an instance?

How does a class differ from an instance?

Instances are objects.  In Visual Basic, classes are not objects.

Properties

Protection levels for properties:

bullet

Private - only accessible within the methods of a class.  Accessibility is not inherited.

bullet

Protected - only accessible within the methods of a class and its subclasses.  Accessibility is inherited.

Property Accessors

bullet

Get - publicly available function to return the value of a class's property.

bullet

Set - publicly available procedure to set a class's property.

Methods

Protection levels for methods:

bullet

Private - only callable within the methods of a class.  Accessibility is not inherited.

bullet

Protected - only callable within the methods of a class and its subclasses.  Accessibility is inherited.

bullet

Public - callable inside and outside of the methods of a class.  These form the class's public interface.  Accessibility is inherited.

Overridable and Overides...

Constructors

 

bullet

Example of a Base Class

bullet

Example of a Sub Class