GoConqr has a new look! Let us know what you think.

Mind map

OOP (Object Oriented Programming)

Adam Cook Computing A-Level English 4.0Average rating 4.0 out of 5 (2 ratings) 1,585 views

Mind map on OOP object oriented programming: class, object, inheritance and reference

Mind map: OOP object oriented programming

Map content

OOP (Object Oriented Programming)

  1. Class

    • Description of how objects should be treated.
    • Describes how data is stored
    • Describes the methods executed on that data
    • Static: Associated with the class. (Runs the same regardless of data).
  2. Object

    • A specific instance of a class
    • Specific instances of data and methods
    • Non-Static: Associated with the object (Needs an object to be initialized).
    • This: Changes data within object. this.numPeople = 2; means this objects numPeople attribute should be set to 2
  3. Attributes

    • What is stored in the object
    • Attributes should never be public always private.
  4. Behvaiours

    • What is done with the object (the methods)
    • Typically operations on the data
    • Methods can be overloaded. i.e. the method is the same but it has different parameters
  5. Constructors

    • Initalises object
  6. Reference

    • Something is passed by reference if the method is simply given a reference (essentially a location) to the data rather than the data itself
    • All capital letter data types are references.
  7. Inheritance

    • Relationships between classes. Used to create more specific versions of classes
    • Superclass: The parent of a class is referred to as a superclass.
      • Stores data and methods common to all subclasses
      • Can also implement default behaviours that can be overwritten
      • Protected methods and attributes are available to all subclasses
    • Subclass: The child of a superclass. A more specific version of a superclass. I.e. What a bike is to a vehicle
      • Inherits methods and attributes of superclass
      • Can add additional attributes and methods
      • Can overwrite behaviours of the superclass
      • super keyword refers to instance of superclass can be used to run methods and for initalisation
      • extends keyword used to state the superclass of a subclass: Bike extends Vehicle

Information

Description
This is specifically designed for and references Java code but is useful for all Object Oriented languages.
Created by
Adam Cook
Views
1,585
Rating
Average rating 4.0 out of 5 (2 ratings)

Feedback

What is it about?

What do you think of the new look?

How do you like it?