GoConqr has a new look! Let us know what you think.

Mind map

FirstTask

Zack Attack English

Map content

FirstTask

  1. Fields: the "attributes" of an object

    • these are variables of the object. fields can also be other classes (ex. an Employee class might have an address field of type Address, where Address is its own, different class). the names of fields capitalize the first letter of every word except the first word (ex. "fieldName")
  2. Methods: the different actions the object can perform, has two parts (declaration and body)

    • declaration: consists of a return value, the method name, and a list of arguments
      • formula of a declaration: returnType methodName (listOfArguments)
    • body: contains code that performs the action
    • the Main Method: the entry point of the application, only one class has to have a main method
      • formula: public static void main (String[] args)
  3. Classes: blueprints/templates that all objects fall within, they define the objects and are the fundamental building blocks of a program in Java

    • general formula for classes can be found on page 77-78 of textbook
      •    class className  {         [content of the class]  }  
      • class names have capital first letters for every word (ex. "ClassName"), class definitions must be saved in a file with the same name plus .java (ex. "ClassName.java")
    • constructors: every class must have at least 1 of these, it has no return value, must have same name as the class

Information

Description
Mind Map on FirstTask, created by Zack Attack on 15/09/2020.
Created by
Zack Attack
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?