Chapter 9 OOP Object Oriented Programming PowerPoint PPT Presentation

presentation player overlay
1 / 7
About This Presentation
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