Unit 2 - Object Oriented Programming
START HERE
download these files -> Becker.jar, Becker Javadocs
YOU MAY GET A WARNING. THIS .jar FILE IS SAFE Please download it.
Key Terms
OOP Presentation Video Lesson
A quick presentation of structure - based on Michael Fudge
Some Definitions: 'static', 'non-static', 'public', 'private'
In this course, you will ALWAYS declare class variables as PRIVATE and class getter and setter methods as PUBLIC.
This is encapsulation. Another class cannot directly modify a class variable. It must use the public getter and
setter methods to modify/return the values in those class variables.
Table showing the differences between Public, Private and Protected. You'll never be tested on 'protected'.
Static Facts
OOP Tutorials
OOP 0
04 - Introduction to Objects and Classes (Michael Fudge)
** BEFORE STARTING OOP1,
download these files and install them as per the instructions - Becker.jar, Becker Javadocs
YOU MAY GET A WARNING. THIS .jar FILE IS SAFE Please download it.
OOP 1 - Make Robots move on a city panel
OOP2 - Fraction methods and objects demonstration
06 - Custom Classes (Michael Fudge) - Creating a 'dice' object and methods to act on it.
Pay attention to Constructors, Getters and Setters
OOP3 - Further exploration of Objects
Don't do the Interface activity. We'll cover this in a few days.
A lesson on Getters, Setters, Public, Private, Static and Non-Static Video is here
Lesson - Commenting Suped - JavaDocs
Quick Review of Getters, Setters and 'this AND demonstration of Javadocs'! Watch THIS video!
*** A Word about 'this' qualifier.
If you see 'this.name', it is a way to remove ambiguity in a method inside a class. If the class variable is name and you have a method that accepts 'name' as an incoming parameter and you want to set the class variable to that value, you could say
this.name = name;
It means that the global variable name in the class is being set to the parameter coming into the method being called to set the global variable for the particular object.
Application of OOP to the Bouncing Ball program
Please create a 'BouncingBall' project and complete ***this activity***. We'll be modifying it with OOP
concepts
OOP Extension to Bouncing Ball Video description
Video - 19 - Interfaces and Inheritance (Michael Fudge) Make particular note at 17:44
Concept of Inheritance For the purposes of test preparation, you are responsible for knowing
up to the end of the example, "Java Inheritance instanceof keyword" AND
"How to use constructor in inheritance in java" AND
"Inheritance and Method Overriding"
Java Interface Lesson
Abstract Class Lesson
Abstract or Interface - Which One?
Comparable Interface Class - Lesson and Tutorial
Subclasses and Inheritance - Tutorial
Unit Testing Lesson and Activity - You are expected to work through the tutorial and understand the
general concepts
07 - JavaDocs and Unit Testing (Michael Fudge) - Generating Playing Cards and methods to act on
them. Pay attention to Constructors, Getters and Setters
Collaborative Coding, Debugging and Unit Testing
Debugger Demo
GitHub - What is it? How can I use it in my ICS4U course?
Lesson and Tutorial
***Summary of Overloading, Overriding, Polymorphism, Encapsulation and Super***
Look at the Becker javaDocs files to see overloading (ex. City methods/constructors)
HOLD IT! I'M CONFUSED!!! What's the DIFFERENCE between Overriding and Overloading?
The Quick and Dirty Guide to OOP - A Nice Summary
Further Overview of OOP - Nanyang University - Singapore
OOP versus Functional Programming - for your own reading/interest. Will not be tested. Not part of course
The Essential Description (unfortunately in broken English, but...that's medium.com for you)
If you are planning to go to U of Waterloo, first year CompSci students use Scheme (aka Racket),
a functional language.
download these files -> Becker.jar, Becker Javadocs
YOU MAY GET A WARNING. THIS .jar FILE IS SAFE Please download it.
Key Terms
OOP Presentation Video Lesson
A quick presentation of structure - based on Michael Fudge
Some Definitions: 'static', 'non-static', 'public', 'private'
In this course, you will ALWAYS declare class variables as PRIVATE and class getter and setter methods as PUBLIC.
This is encapsulation. Another class cannot directly modify a class variable. It must use the public getter and
setter methods to modify/return the values in those class variables.
Table showing the differences between Public, Private and Protected. You'll never be tested on 'protected'.
Static Facts
OOP Tutorials
OOP 0
04 - Introduction to Objects and Classes (Michael Fudge)
** BEFORE STARTING OOP1,
download these files and install them as per the instructions - Becker.jar, Becker Javadocs
YOU MAY GET A WARNING. THIS .jar FILE IS SAFE Please download it.
OOP 1 - Make Robots move on a city panel
OOP2 - Fraction methods and objects demonstration
06 - Custom Classes (Michael Fudge) - Creating a 'dice' object and methods to act on it.
Pay attention to Constructors, Getters and Setters
OOP3 - Further exploration of Objects
Don't do the Interface activity. We'll cover this in a few days.
A lesson on Getters, Setters, Public, Private, Static and Non-Static Video is here
Lesson - Commenting Suped - JavaDocs
Quick Review of Getters, Setters and 'this AND demonstration of Javadocs'! Watch THIS video!
*** A Word about 'this' qualifier.
If you see 'this.name', it is a way to remove ambiguity in a method inside a class. If the class variable is name and you have a method that accepts 'name' as an incoming parameter and you want to set the class variable to that value, you could say
this.name = name;
It means that the global variable name in the class is being set to the parameter coming into the method being called to set the global variable for the particular object.
Application of OOP to the Bouncing Ball program
Please create a 'BouncingBall' project and complete ***this activity***. We'll be modifying it with OOP
concepts
OOP Extension to Bouncing Ball Video description
Video - 19 - Interfaces and Inheritance (Michael Fudge) Make particular note at 17:44
Concept of Inheritance For the purposes of test preparation, you are responsible for knowing
up to the end of the example, "Java Inheritance instanceof keyword" AND
"How to use constructor in inheritance in java" AND
"Inheritance and Method Overriding"
Java Interface Lesson
Abstract Class Lesson
Abstract or Interface - Which One?
Comparable Interface Class - Lesson and Tutorial
Subclasses and Inheritance - Tutorial
Unit Testing Lesson and Activity - You are expected to work through the tutorial and understand the
general concepts
07 - JavaDocs and Unit Testing (Michael Fudge) - Generating Playing Cards and methods to act on
them. Pay attention to Constructors, Getters and Setters
Collaborative Coding, Debugging and Unit Testing
Debugger Demo
GitHub - What is it? How can I use it in my ICS4U course?
Lesson and Tutorial
***Summary of Overloading, Overriding, Polymorphism, Encapsulation and Super***
Look at the Becker javaDocs files to see overloading (ex. City methods/constructors)
HOLD IT! I'M CONFUSED!!! What's the DIFFERENCE between Overriding and Overloading?
The Quick and Dirty Guide to OOP - A Nice Summary
Further Overview of OOP - Nanyang University - Singapore
OOP versus Functional Programming - for your own reading/interest. Will not be tested. Not part of course
The Essential Description (unfortunately in broken English, but...that's medium.com for you)
If you are planning to go to U of Waterloo, first year CompSci students use Scheme (aka Racket),
a functional language.