Introduction / Object Orientation 1: Objects & Classes
Subtitles of the Movie
Object orientation, objects and classes. We are going to talk about some of the basic building blocks of object orientation and those are the object and the class. So let's start by defining what an object is. An object is something that exists in the context of the system and an object is an instance of a particular class. So in our illustration here we have a system that's an aquarium and within that aquarium we have a class called goldfish and within that class of goldfish we have individual instances of particular fish. So those are our objects so as you just saw a class is a category into which objects can be organized individual instances of particular fish can be organized into the goldfish category. In addition a class is also a template from which objects can be created. So you can think of a class as a cookie cutter or a rubberstamp. Once you've defined a class you can use it to create brand new objects. Classes and by extension the objects within that class have some things which define them and those include attributes which are properties in our goldfish class some of the attributes might be size, color and gender. Classes also have operations; operations represent functionality, things that an object can do or have done to it. So with the goldfish class the operations might be swim, eat or be eaten. The concept of inheritance is useful when you're working with classes because each sub class inherits the characteristics of the class above it. So here we have an inheritance hierarchy and at the top our super class is fish and all the attributes and operations belonging to the fish class by extension also belong to the sub classes of trout, goldfish and shark. So even though those are all kinds of fish their also different from each other in specific ways, enough to each be its own class. And then within the goldfish class we have the individual objects particular fish swimming in an aquarium, we'll call them goldie, bubbles and killer, and those fish share all of the attributes and operations that are common in particular to goldfish.
Tutorial Information
| Course: | UML |
| Author: | Nancy Conner |
| SKU: | 33815 |
| ISBN: | 1-934743-23-2 |
| Release Date: | 2007-10-26 |
| Duration: | 7 hrs / 95 lessons |
| Captions: | For Online University members only |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |
VTC Sign up & Benefits
- Unlimited Access
- 81,350 Video Tutorials (20,800 free)
- Video Available as Flash or QuickTime
- Over 782 Courses
- $30 for One Month Access
- Multi-User Discounts Available
United States 