Professional Documents
Culture Documents
OOP Lec2
OOP Lec2
Programming
Lecture 2
Prepared by: Ms. Roda Flor Andrea B. Teodocio
Reference: www.udacity.com
Outline
Integrated Development Environment (IDE)
01
Self-Reference
02
Constructors
04
Integrated Development
Environment
What is an IDE?
To be able to create and run any code in Java (and pretty much any
programming language), you will need 2 main things:
• A helpful text editor that highlights keywords with different colors and autocompletes code.
• A compiler that converts your Java code into computer code (known as bytecode) that can be
understood by computers and hence run properly.
An IDE will help you power through creating any project in almost any
programming language.
Choosing an IDE?
Create a public method that sets each private field, this way you
will know when you are changing a field. These methods are called setters
Create a public method that returns each private field, so you can read the
value without mistakingly changing it. These methods are called getters
Methods
Public VS Private
The private methods are usually known as helper methods, since they
can only be seen and called by the same class, they are usually there
to organize your code and keep it simple and more readable.
The public methods are the actual actions that the class can perform
and are pretty much what the rest of the program can see and call.
Methods
Public VS Private