Mapa mental
Chapter 4: "Objects and Classes"
Conteúdo do mapa
Chapter 4: "Objects and Classes"
OOP: Object Oriented Programming
- Using models to solve real problems
Object
- Every object has two features
- Attributes
- In Java: Fields
- Actions the object is able to perfrom
- In Java: Methods
- Attributes
- AKA: Instance
- No value: null
- Every object has two features
Classes
- Blueprint needed to create objects of identical type
- Class determines the object
- Let programmers create abstraction of a problem
- Abstraction: Using programming objects to represent real-world objects
- All elements in Java must reside in a class
- 3 things to consider when writing a class
- Class name
- Fields
- Methods
- Keyword: class
- Every class must have a constructor.
- Used to construct an object.
- AKA: "constructor method"
- Does not have return value
Fields
- Primative or reference variables
Methods
- Define actions objects can do
- Declaration + Body
- Declaration: Return value, method name, list of arguments
- Void: Method returns nothing
- Body: code to perform that action
- Declaration: Return value, method name, list of arguments
- Main: entry point to application
UML: Unified Modeling Language
- UML class diagram
- Allows you to include field type and method signature.
Informações
- Descrição
- Mapa Mental sobre Chapter 4: "Objects and Classes", criado por kimberly mace em 07-09-2020.
- Criado por
- kimberly mace
- Visualizações
- 0
- Avaliação