OOP (Object Oriented Programming)

Description

This is specifically designed for and references Java code but is useful for all Object Oriented languages.
Adam Cook
Mind Map by Adam Cook, updated more than 1 year ago
Adam Cook
Created by Adam Cook over 6 years ago
1440
3

Resource summary

OOP (Object Oriented Programming)
  1. Class
    1. Description of how objects should be treated.
      1. Describes how data is stored
        1. Describes the methods executed on that data
          1. Static: Associated with the class. (Runs the same regardless of data).
          2. Object
            1. A specific instance of a class
              1. Specific instances of data and methods
                1. Non-Static: Associated with the object (Needs an object to be initialized).
                  1. This: Changes data within object. this.numPeople = 2; means this objects numPeople attribute should be set to 2
                  2. Attributes
                    1. What is stored in the object
                      1. Attributes should never be public always private.
                      2. Behvaiours
                        1. What is done with the object (the methods)
                          1. Typically operations on the data
                            1. Methods can be overloaded. i.e. the method is the same but it has different parameters
                            2. Constructors
                              1. Initalises object
                              2. Reference
                                1. Something is passed by reference if the method is simply given a reference (essentially a location) to the data rather than the data itself
                                  1. All capital letter data types are references.
                                  2. Inheritance
                                    1. Relationships between classes. Used to create more specific versions of classes
                                      1. Superclass: The parent of a class is referred to as a superclass.
                                        1. Stores data and methods common to all subclasses
                                          1. Can also implement default behaviours that can be overwritten
                                            1. Protected methods and attributes are available to all subclasses
                                            2. Subclass: The child of a superclass. A more specific version of a superclass. I.e. What a bike is to a vehicle
                                              1. Inherits methods and attributes of superclass
                                                1. Can add additional attributes and methods
                                                  1. Can overwrite behaviours of the superclass
                                                    1. super keyword refers to instance of superclass can be used to run methods and for initalisation
                                                      1. extends keyword used to state the superclass of a subclass: Bike extends Vehicle
                                                    Show full summary Hide full summary

                                                    Similar

                                                    Software Processes
                                                    Nurul Aiman Abdu
                                                    Computing Hardware - CPU and Memory
                                                    ollietablet123
                                                    A level Computing Quiz
                                                    Zacchaeus Snape
                                                    Types and Components of Computer Systems
                                                    Jess Peason
                                                    Input Devices
                                                    Jess Peason
                                                    SFDC App Builder 2
                                                    Parker Webb-Mitchell
                                                    Data Types
                                                    Jacob Sedore
                                                    Intake7 BIM L1
                                                    Stanley Chia
                                                    DNA Basics
                                                    Sarah Juliette B
                                                    Output Devices
                                                    Jess Peason
                                                    Design Patterns
                                                    Erica Solum