9.17.2008

In DS & A - Classes

It is based on our lecture in Data Stucture and Algorithm that...

A class is an expanded concept of a data structure: instead of holding only data, it can hold both data and functions.

An object is an instantiation of a class. In terms of variables, a class would be the type, and an object would be the variable.

Classes are generally declared using the keyword class, with the following format:

class class_name {
access_specifier_1:
member1;
access_specifier_2:
member2;
...
} object_names;


0 comments:

Recent Comments

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites