Objects and Classes


Objects and Classes



Last modified on September 17, 2001
by rpj@cs.rit.edu.
LAST SLIDE UP NEXT SLIDE PREVIOUS HERE NEXT


















































Objects and Classes
class
You specify that you are defining a class by means of the keyword "class". If you are extending an existing class, you use the keyword "extends".

Last modified on September 17, 2001
by rpj@cs.rit.edu.
LAST SLIDE UP NEXT SLIDE PREVIOUS HERE NEXT


















































Objects and Classes
class
data and methods
are defined within the class.

Last modified on September 17, 2001
by rpj@cs.rit.edu.
LAST SLIDE UP NEXT SLIDE PREVIOUS HERE NEXT


















































Objects and Classes
class
data and methods
Constructors
Classes usually have at least one constructor method, whose name matches the class name.

Last modified on September 17, 2001
by rpj@cs.rit.edu.
LAST SLIDE UP NEXT SLIDE PREVIOUS HERE NEXT


















































Objects and Classes
class
data and methods
Constructors
new
The keyword "new" is used to invoke a constructor.

Last modified on September 17, 2001
by rpj@cs.rit.edu.
LAST SLIDE UP NEXT SLIDE PREVIOUS HERE NEXT