Chapter 9 OOP Object Oriented Programming - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

Chapter 9 OOP Object Oriented Programming

Description:

Analogy - gingerbread man cookie cutter. Instance (Instantiate) one of the set of objects that belongs to a class. Analogy - any of the gingerbread men cookies ... – PowerPoint PPT presentation

Number of Views:82
Avg rating:3.0/5.0
Slides: 8
Provided by: carlo316
Category:

less

Transcript and Presenter's Notes

Title: Chapter 9 OOP Object Oriented Programming


1
Chapter 9OOP - Object Oriented Programming
9
IS 2020
CI 9008 George Zolla
Prof
. Gary Porter
grporter_at_
nps
.navy.mil
Naval Postgraduate School
Monterey, CA
2
Instances and Classes
  • Class
  • formal definition of an object
  • Methods Properties
  • Analogy - gingerbread man cookie cutter
  • Instance (Instantiate)
  • one of the set of objects that belongs to a class
  • Analogy - any of the gingerbread men cookies

3
Object
  • Object
  • Properties - characteristics of an object
  • Methods - action or behavior
  • Examples
  • Cookie.Flavor Chocolate Property
  • Cookie.Crumble Method

4
Classes versus objects
l l l l l l l l
5
Object-oriented Language
  • Encapsulation
  • Holds all properties, methods events
  • Referred to as data hiding (Private)
  • Polymorphism (many shapes)
  • Behaviors that are named the same but act
    differently in different classes
  • Inheritance (Not in VB)
  • create a new class from an existing class.

6
Sample class hierarchy
l l l l l l l l
Employee
7
Class hierarchy and instance variables
l l l l l l l l
Write a Comment
User Comments (0)
About PowerShow.com