JPVNotes1-OOP - Introduction to Object-Oriented Programming...

Info icon This preview shows pages 1–5. Sign up to view the full content.

Click to edit Master subtitle style  6/22/2005 Introduction to Object-Oriented Programming Notes Supplement CS 1054 Introduction to Programming in Java Spring 2008
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

 Introduction to Object-Oriented Programming 21: Intro to OOP Object-Oriented Programming n The traditional definition of a  program is: a sequence of instructions to be executed on a computer n In the Object-Oriented Programming (OOP)  paradigm, a program that executes is a collection  of interacting  objects n In this paradigm, the programs we write/specify  what are in these objects and how these objects 
Image of page 2
 Introduction to Object-Oriented Programming 31: Intro to OOP What is an Object? Definition:   A “thing” that has type, identity, state,  and behavior n type:  belongs to a  class  of similar objects n identity :  is a distinct instance of that  class n state / attributes :  has a set of properties (or fields) n each field has a value, that may be different per object of the  same  class n behavior :  what the object knows how to do n objects of the same  class  can carry out the same behavior 
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

 Introduction to Object-Oriented Programming 41: Intro to OOP Examples of Objects n state/attributes n on (true or false) n behavior n switch on n switch off n state/attributes n # of gallons of gas in tank n
Image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern