In Java, most everything is organized into classes. Even the code that creates this myWashMach object would have to be contained in a class. We'll talk about this more later on.
Class - the definition or description of a washing machine in general. The class defines the contents and behaviour of washing machines.
Object - a particular washing machine that was made using the class definition of a washing machine. One particular washing machine might have a power consumption rating of 10, have 5.4 litres of water in it, be a Kenmore name brand, and have the lid currently up. Another particular washing machine might have a power consumption rating of 15, have 8.3 litres of water in it, be a Kenmore name brand, and have the lid currently down.
[ CSC108 Home | Outline | Announcements | Newsgroup | Assignments | Lectures | Marks | Links ]
© Copyright 2000. All Rights Reserved.