Mapa mental
Objects
Contenido del mapa
Objects
Objects are instances of classes and form the broadest category in OOP. This is the "company"
Classes
- Classes act as templates for objects, giving them definitions and parameters the program can utilize. Very useful for organizing data in a meaningful way. These are the "Employees" or other.
- Class Features
- Class Name: self explanatory, "Employees" in this case
- Class Fields: These are the specific data points that make up the template. In this case things like Employee Name, ID Number, Title, and Work Phone may be useful data points for a program
- What they look like: int ID_Number = ############;
- Class Methods: These are the "actions" that an object can make, often relating to the fields in that object's class. Think that the object "Employee1" of the Employee class can change its fields such as Name or Work Phone. Some may even access the fields of other objects under certain conditions
- Must have a return value such as int getID () or void changeName (NewName)
- Main () method: Acts as the entry point of a program
- Constructors: These are methods used to create new objects some may take arguments to initialize fields, while some may set default values
- Each class needs one constructor minumum
- Looks Like: public Employee (argument) {body}
Instantiate with the following Employee Employee1 = new Employee;
Información
- Descripción
- Mapa Mental sobre Objects, creado por PSIKid 120 el 12/09/2020.
- Creado por
- PSIKid 120
- Visitas
- 0
- Valoración