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

Mind map

OOP: object-oriented programming

Xinyi Ge English

Map content

OOP: object-oriented programming

  1. objects

    • living eg: people
    • concrete eg: book
  2. object

    • living eg: people
    • concrete eg: book
    • abstract eg: idea
  3. class--serve as template in programming, to create identical type of objects

    • using Pascal naming convention
    • class definition, use the same name as class
      • eg: Employee.java for class Employee
  4. field (attributes for objects), using Pascal naming convention, Capitalize the initials

    • variables : primitives/references to objects
  5. method (actions for objects) , using camel naming convention, capitalize all initials except the first word

    • actions objects do
    • declaration of methods is called signature of methods
    • method main
      • entry to an application
      • arguments written as string
  6. return type: primitive/ object/ void (nothing to return)

  7. UML diagram

    • class name on the top, lists of fields in the middle and methods in the bottom
    • have to have a comma between field and type , arguments as a string , return type is written after colon
  8. constructor

    • each class has to have a constructor
      • have to use the same name as class
    • no-argument constructor
      • constructor has no argument
  9. the null keyword

    • not referencing any object
      • "null" will be assigned when declaring a local reference variable within a method but do not sign object to it
      • the "==" operator for testing if a reference variable is null
  10. create objects

    • objects also refer to instance
    • instantiate
      • use "new" keyword, declare object reference with the same type as object, assign values

Information

Description
Mind Map on OOP: object-oriented programming, created by Xinyi Ge on 12/09/2020.
Created by
Xinyi Ge · Sep 2020
Updated
Sep 12, 2020
Views
1
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?