Variables of reference data types:
-------------------------------------------------------- 8/24
Basic Java programming:
Programming language:
Operators and Expressions:
Statements:
Data structures:
Arrays:
Methods:
Overview of methods:
The parameter passing mechanism used in Java:
Exception handling:
Throwing and catching exceptions:
-------------------------------------------------------- 8/29
Assignment 1: (Java Review - programming with arrays)
End review
Objects and Classes
(Chapter 9 in Liang's textbook)
Intro to object oriented programming
Defining classes and creating objects with classes:
Constructors of a class:
-------------------------------------------------------- 8/30
Accessing object via reference variables:
The this reference variable:
Copying object:
The copy constructor of a class:
Array of objects:
Intro to Object Oriented Programming -
implementing a deck of cards
-------------------------------------------------------- 9/5
Assignment 2: (Implement methods and constructors)
Data (field) encapsulation:
Immutable objects and how to define classes to make them:
Passing object arguments to methods:
Static variables (and constants) and static methods:
-------------------------------------------------------- 9/7
Java packages
(Chapter 9.8 in Liang's book)
Java package and
the default visibility (accessibility) modifier:
Inheritance and Polymorphism
(Chapter 11 in Liang's book)
Introduction to inheritance:
The Object Oriented Design methodology
(superclass and subclass):
-------------------------------------------------------- 9/12
Program design using the Object Oriented Design methodology:
Relationship between superclass and subclass and
their constructors:
Assignment 3:
(inheritance, constructor and toString())
The need
to use an overridden method
in the superclass from inside a subclass:
-------------------------------------------------------- 9/14
Overriding vs. overloading:
Java's Object class
and
its toString() method:
Intro to Polymorphism:
Application of polymorphism:
The selection sort algorithm for
integers
The selection sort algorithm for
Circle objects,
Rectangle objects
and
GeometricObject objects
-------------------------------------------------------- 9/19
The mechanism of the polymorphic behavior:
Polymorphism in exception handling:
Assignment 4:
(polymorphism)
Terminology:Upcasting, downcasting and
the
instanceof operator:
-------------------------------------------------------- 9/21
The protected
accessibility classfier:
Preventing a class from being extended by other classes:
Postscript on inheritance:
(1) hiding an inherited variable and
(2) multiple inheritance
Abstract classes and Interfaces
(Chapter 13 in Liang's book)
Java's
Comparable<T> interface and
methods that makes use of it:
Additional information on
interfaces:
Brief review OOP concepts:
Generics: parameterized data type
(Chapter 19 in Liang's book)
Intro to
Generic Classes (a.ka. parameterized classes):
-------------------------------------------------------- 9/28
Intro to Generic Methods:
Limiting the data types in a
generic class or method:
Assignment 5:
(generics and interfaces)
Data Structures
The Array Data Structure
The Linear Search and the
Binary Search Algorithms for arrays:
Inserting and deleting in an array:
-------------------------------------------------------- 10/3
Dynamic arrays and Java's
ArrayList class:
The stack data structure and its
applications
(Abbey's material - Liang's book uses linked list, no good)
Intro to the stack data structure:
The Stack interface:
Implementing the Stack with a fixed size array:
Implementing the Stack with a dynamic size array:
-------------------------------------------------------- 10/5
Implementing a generic stack
The Java Stack class:
Algorithm that uses a stack (1):
reverse polish expression evaluation:
Algorithm that uses a stack (2):
Dijkstra's 2 stack algorithm for expression evaluation:
-------------------------------------------------------- 10/12
Assignment 6:
(Infix to postfix conversion using a stack)
The queue data structure and its
applications
(Abbey's material - Liang's book uses linked list, no good)
Intro to the queue data structure:
The Queue interface:
Implementing the queue with a fixed size array:
Implementing the queue with a circular buffer:
---
Other kinds of queues:
"Double ended" queue (a.k.a.: DEque or deque):
Priority queue (a.k.a.: a heap):
Using a Queue in Java Library:
-------------------------------------------------------- 10/17
Linked list
(Chapter 24.4 in Liang's book discusses a slighly different kind of
list - it also has a tail variable))
Intro to linked list:
Implementation of a simple linked list:
The standard list traversal algorithm:
-------------------------------------------------------- 10/24
Implementation of the standard operations
on the simple linked list:
Preliminaries (List operations, SimpleList interface,
nested classes, constructor and isEmpty()):
Inserting and deleting at the front of the SimpleList:
Inserting and deleting at the end of the SimpleList:
-------------------------------------------------------- 10/26
Retrieving items from a linked list:
Removing a specific element from a linked list:
Summary of manipulations on a linked list:
Assignment 7:
(Inserting and deleting at position pos in
the simple linked list)
Other types of linked lists:
Using a linked list in the for-each loop ---
implementing an iterator for a linked list:
The Iterarable interface - how to make objects
"iterable" in Java:
The Iterator interface - an
object use to iterate over a collection:
Using linked list to implement the Stack
data structures:
-------------------------------------------------------- 10/31
Using linked list to implement the Queue
data structures:
The JavaLinkedList class:
Algorithms
How "good" is this algorithm ?
--- Running time/Complexity Analysis
(Chapter 22 in Liang's book)
Introduction to Algorithm Analysis:
Measuring Algorithm Efficiency using the
Big-O notation: