Class
When a group of statements, such as control structures, are all put together to be referred to this.
Indentations
It needs to be correctly indented for the code to be considered a part of the class.
Variable declarations
are found at the top of the code right after the header.
.java extension
lets the compiler recognize the file as containing java code.
.java file
is called the source code for a program because it defines the program’s actions and functions.
Method
A group of code that performs a specific task.
Driver class
A class that is created to control a larger program
Object class
This class houses the “guts” of the methods that the driver class calls.
Java
is a descendent of the object class in the Java language.
Java language
Every class in Java is a descendent of the object class in the
Header
It’s used to define the function of the method.
Constructor
They set an object's initial values for instance variables.
Parameters
(these are optional) They are data that the method needs to function properly.
instance variables, or fields
Three attributes in order for the code to function correctly.
Visibility
is if the method is public or private.
Return type
specifies the type of data that will be returned from the methods after its commands are executed.
Method name
is the name of the method.
Overloading
writing multiple methods that perform the same task, but require different information, or parameters to to something.
Precondition
A comment that is intended to inform the user more about the condition of the method and guarantees it to be true.
Postcondition
A condition that must always be true just after the execution of a section of code, or after an operation in a formal specification.
Composition
In order for the classes to come together and have the program function properly, they need to work together properly.
Driver and object classes
must be in the same folder on the computer.
Programmer
has to take on the responsibility of deciding which objects to instantiate and to which types and when to use them, and how they are used based on the needs of the class.
Aggregate class
Made up of other data, and instances of other classes.
this
is a keyword used to reference the current calling object and may be used as an object variable.
Static variable
is an attribute that is shared among all instances of a class.
Non-constructor
method that is designed to access or modify a static variable is a static method.