Please enable JavaScript.
Coggle requires JavaScript to display documents.
OOP ( Object Oriented Programming) - Coggle Diagram
OOP
( Object Oriented Programming)
Reference
All capital letter data
types are references
Something is passed by reference if
the method is simply given a refrence
to the data rather than the data it self
Attributes
What is stored
in the object
Attributes should never
be public always private
Behvaiours
What is done with the object
( The methods)
Typically operations
on the data
Methods can be overloaded
The method is the same but
it has got different parameters
Constructors
Initalises object
Object
A specific instance
of a class
Specific instances
of data and methods
This: Changes data within object.
this.nunpeople =2 means this
objects numpeople attribute should
be set to 2
Non-static: Associated with the object
( Needs an object to be initalized)
Class
Non.static: Associated with the class
( Runs the same regardless of data)
Description of how
objects should be treated
Describes how data is stored
Describes the methods executed on that data
Inheritance
Superclass: The parent of
a class is referred to as
a superclass
Relationships between classes. Used
to created more specific versions of classes
Subclass: