{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

day2 - COP 3503 Computer Science II CLASS NOTES...

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

View Full Document Right Arrow Icon
COP 3503 – Computer Science II CLASS NOTES DAY #2 INTRODUCTION TO OOP Terminology Class Complete description of an object Provides the model, or pattern, from which an object is created. Example: An architect creates a blueprint when designing a house. The blueprint defines the important characteristics of the house: walls, windows, doors, electrical outlets, etc. Once the blueprints are created, several houses can be built using the same blueprint. In one sense the houses built from the same blueprint are different. They are in physically different locations, have different addresses, different furniture, and different people live in them. Yet in many ways they are the “same”. The layout of the rooms is the same, the electrical outlets are in the same locations as are the windows, etc. To create a completely different house we need a different blueprint. A class is a blueprint of an object. It defines the type of data that will be held in an object and defines the code for the methods. But a class is not an object any more than a blueprint is a house. Container for methods and data. Reserves no space for data – each object has its own data space (reserved at time of instantiation) Constructors are used to instantiate an object. Instantiation Once a class is defined, an object can be created from it. The process of creating an object is called instantiation . Every object is an instance of a particular class.
Image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
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