Mindmap
First task
Inhalt der Mindmap
First task
Object/Instance
- Do not need to have the details of real-world objects
- Components
- Attributes/fields
- Actions/Methods
- Attributes/fields
- Class is a blueprint to create object of
- Classes
- Components- within a UML diagram each lie within a rectangle separated by lines
- Class Name
- Class names capitatize the initial of each word
- Class delcaration must use keyword class followed by class name: class className {[class body]}
- the Fields
- Variables: primitives or references to objects
- Camel convention: Capitalize the initial of each word,except the first
- Ex: age, maxAge, numberOfRows
- The methods
- Method Main
- Provides entry point to an application.
- public static void main(String[] args)
- To pass arguments to main, type them after the class name. java className arg1 arg2
- Provides entry point to an application.
- Declaration
- returnType methodName (list OfArguments0
- Define actions that a class's objects can do
- Capitalize the name of eac word, except the first
- Method Main
- Class Name
- Constructors
- Every class must have at least one constructor. Must have the same name as the class
- constructorName (listOfArguments) {[constructor body]}
- Every class must have at least one constructor. Must have the same name as the class
- Components- within a UML diagram each lie within a rectangle separated by lines
- Classes
- Create through new Word () ;
- New is always followed by the constructor of the class.
- Some reference variables have null vvalues book==null
Object Oriented Programming
Informationen
- Beschreibung
- Mindmap am First task, erstellt von Martha-Grace McLean am 16/01/2020.
- Erstellt von
- Martha-Grace McLean
- Aufrufe
- 0
- Bewertung