Mapa mental
4. Objects and Classes
Conteúdo do mapa
4. Objects and Classes
Objects
- a created model that resembles a real-life situation to solve an issue. ex. objects of a company payroll application - Company, Employee, Tax
- Classes
- We need classes to create Java objects which is similar to blueprints or a design template. The class determines the object. Classes are an OOP tool that enable programmers to create the abstraction of a problem. class className { [class body]} Pascal Naming - Capitalize the initial of each word - PostOffice
- fields
- camel naming - capitalize the initial of each word, except the first word. - same for Methods
- methods
- Methods define actions that a class's objects can do.
- declarations
- return value, the method name, a list of arguments returnType methodName (listOfArguments) ex1. double getSalary() <- getSalary method that returns a double, no arguments ex2. Address getAdress () <- a method that returns an Address oject ex3. int negate(int number) <-
- body
- The body contains code that perform the action.
- UML - class name
- list of fields
- list of methods
- list of fields
- constructor
- attributes
- actions
- instance
- new
Informações
- Descrição
- Mapa Mental sobre 4. Objects and Classes, criado por Sungeun Yoon em 03-09-2019.
- Criado por
- Sungeun Yoon
- Visualizações
- 0
- Avaliação