Object Oriented Programming An Introduction

Document Sample
Object Oriented Programming An Introduction Powered By Docstoc
					Object Oriented
Programming:
An Introduction
    CPSC 110


                  J. Michael Moore
Procedural/Functional          Object Oriented
    Programming                 Programming

• Pascal is an example      • A different
• Focus is on the steps       _______________ on
  from beginning to end       programming
  using                     • Focus on "________"
  – _________________         and their __________
    (i.e. ______________
          & ____________)
• Data is something
  that gets __________
  & ________________

                                          J. Michael Moore
      Objects _____________
• ______________             • _______________
   – Dogs                      – Dogs
      •   Fur color               •   Bark
      •   Weight                  •   Sit
      •   Age                     •   Fetch
      •   …                       •   …


Described in a ______ by its ____________
   – Similar to ______________ in Pascal… think _________
• __________                 • ___________
   – Similar to __________     – Similar to __________
     in Pascal                   in Pascal
                                              J. Michael Moore
Modeling ___________
            Class Name


            ___________




            ___________




                          J. Michael Moore
      __________________
• ______ the details of how an object is
  implemented.
  – Similar to _____________________ in Pascal
• Keeps most of the code related to an
  object ______________.
• Control ________ by setting ________ to
  members as
     ________, ________, and ________

                                      J. Michael Moore
         ______________
• Subclasses have ____________________
  defined in the parent class.
• Subclasses can ___________________ of
  parent class, i.e. ____________ behavior.
• Subclasses can _____________________
  members.




                                   J. Michael Moore
Modeling _____________




                    J. Michael Moore
    _____________________
• Treat _________ classes as instances of
  the _________ class.




                                   J. Michael Moore