Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS1402 – Introduction to CIS Tom Gustafson. * An object is an entity that has attributes and methods. * Ex: A light bulb is an object. * The attributes.

Similar presentations


Presentation on theme: "CIS1402 – Introduction to CIS Tom Gustafson. * An object is an entity that has attributes and methods. * Ex: A light bulb is an object. * The attributes."— Presentation transcript:

1 CIS1402 – Introduction to CIS Tom Gustafson

2 * An object is an entity that has attributes and methods. * Ex: A light bulb is an object. * The attributes of a light bulb could be: * Florescent or Incandescent * Watts * Size * The methods of a light bulb could be: * Turn on * Turn off * Insert

3 * With computers, there are many objects: * Files * User accounts * Groups * Hardware components * Services

4 * A User Account has attributes and methods * Attributes (Properties or Data) * Username * Password * Creation Date * Methods (Actions or Operations) * Disable Account * Change Password * Log off

5 * Think of an attribute (property or data) of an object like a place holder to store information about the object. It’s like a variable. It’s like a field in a database record. * Think of a method (action or operation) as something you do to the object. It’s like a function or procedure. It does something.

6 * A “Class” is at type or category of object. * For example, “light bulb” is a class of object. * All objects of class light bulb have the same attributes and methods. * Attributes like watts, size, etc. * Methods like turn on/off, insert, etc. * But, two objects of the same class can have different values for their attributes. Ex: one may be 75 watt and another may be 100 watt.

7 * Here are some classes of real-life objects: * Car * Tree * Person * Book * Every car has VIN, make, and model attributes and start and brake methods. * An object is an instance of the class it is part of.

8 * On a Computer, there are many classes of objects. Here are three: * Service * Attributes: name, status, type * Methods: start, stop, pause * File * Attributes: name, creation date, read-only * Methods: delete, rename, open * User Account * Attributes: name, password, lockout status * Methods: change password, log off, disable,

9 * There are classes or categories of objects. * An object is an instance of its class. * Every class of object has the same: * Methods – actions that can be performed on an object of that class * Attributes – properties of every object of that class


Download ppt "CIS1402 – Introduction to CIS Tom Gustafson. * An object is an entity that has attributes and methods. * Ex: A light bulb is an object. * The attributes."

Similar presentations


Ads by Google