Mind map
Objects and classes
Map content
Objects and classes
Java is an object-oriented program.
- Objects are everywhere; they are living and nonlving.
- Objects perform actions (methods)
- Objects are everywhere; they are living and nonlving.
Need classes to create objects, they are the blueprint.
- If Employee object only needs to work and be paid, then the class only needs these two methods.
- Address getAddress: returns an Address object
- Consider 3 things: the name, fields, and methods. (Structural order of a UML diagram)
- Fields are variables
- Main method is needed. "Public static void main(String [ ] args)"
- If Employee object only needs to work and be paid, then the class only needs these two methods.
Every class must have at least one constructor. Constructors are like mthods but have no return value.
Can use "new" to create an object.
Information
- Description
- Mind Map on Objects and classes, created by Matthew S on 16/01/2020.
- Created by
- Matthew S
- Views
- 0
- Rating