A class is like a blue print from which you can

This preview shows page 8 - 13 out of 15 pages.

A Class, is like a blue print, from which you can  create many objects. Think about the floor plan of apartment buildings. Many  apartments can be built based on the floor plan. Idea behind OOP
Image of page 8

Subscribe to view the full document.

Reusability. More manageable More secure data Cons Need more initial time for design   Pros of OOP
Image of page 9
Cookie cutter is the class. Cookies are the objects. Dough is the memory. Cookie Cutter Analogy Cookie cutter Cookie dough Cookies
Image of page 10

Subscribe to view the full document.

Class represents an abstract view of group of  similar objects (ex: cars, animals, …) Once a class is defined, objects of that class can  be instantiated (declared, created). Objects of a class have the same behavior They can do similar things. Objects of a class have (different values) for the  same properties. Class & Objects
Image of page 11
Object properties  Characteristics or attributes that describe an object methods  Actions or behavior that describe what an object can do.
Image of page 12

Subscribe to view the full document.

Image of page 13
You've reached the end of this preview.

{[ 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