Mindmap
FirstTask
Inhalt der Mindmap
FirstTask
Object Oriented Program
- What is an object?
- An object is an instance of a class
- Attributes are also called Fields
- Primitives
- Reference to objects
- How to name fields?
- Use camel naming convention: capitalize every word expect the first one
- Actions are also called methods
- How to declare methods?
- returntype-----methodname---(list of arguments)
- A return type can be a primitive, an object or void
- A "main" method is a special method that provides an entry to an application
- It allows the class containing it to be invoked
- How to declare a main method?
- public static void main (String[] args)
- Only 1 main method is required in an application
- Only arguments accepted are strings
- How to declare a main method?
- It allows the class containing it to be invoked
- A "main" method is a special method that provides an entry to an application
- A return type can be a primitive, an object or void
- returntype-----methodname---(list of arguments)
- Constructors methods are used to construct objects.
- Every class needs to have it; if not manually provided, the compiler adds one
- How to declare a constructor method?
- constructorname (list of arguments) { [body ] }
- Named after class name
- If it has not arguments it is called a "no argument constructor"
- Constructor arguments can be used to initialize the fields of the object
- constructorname (list of arguments) { [body ] }
- Constructor methods have no return type: not even void
- How to declare a constructor method?
- Every class needs to have it; if not manually provided, the compiler adds one
- How to declare methods?
- An object can have an attribute or an action or both or neither
- Attributes are also called Fields
- An object is an instance of a class
- What is a Class?
- Classes are tools programmer use to create an abstraction
- Building blocks of Java
- How to declare a class?
- Use class + name to declare a class
- Use Pascal Convention: Capitalize the first letter of every word
- Use class + name to declare a class
- How to represent a class using a UML diagram?
- Create a rectangle with 3 parts: Name(top), fields(middle), methods(bottom)
- What is an object?
Informationen
- Beschreibung
- Mindmap am FirstTask, erstellt von Haben Belai am 27/05/2021.
- Erstellt von
- Haben Belai
- Aufrufe
- 0
- Bewertung