Code.org OOP
Learning of object oriented programming
Code.org OOP
Proof of completion
![]code.org2_pic.png)
Classes and Objects
Classes are a way to create and store objects and their data types and methods. They contain data, such as variables and actions, such as methods.
Instances
Instances are variables that are non-static and belong to a certain class. To create the, an object has to be instantiated to all methods in that class.
Loop Statements
Java has if and while statements that allow for code to be executed with a specific condition.
For a while loop, if the condition is true, the code will continue to run until that same condition is false.
For an if statement, the code will only run once if the condition is true. If statements can and are sometimes followed with an else statement that provides a code to run if the latter condition is false.
Extends
Extends, as in the name, extend a java class. It inherits another class, which takes in the methods and attributes from another class and brings it elsewhere. After this, more methods and attributes are able to be added to this class.
A subclass is the class that inherits it.
A superclass is the class being inherited from.