Learning Activities

Due Dates

Textbook pages

Documents / Code

Online Lecture

Review:
Computer Architecture:Java
is a high-level language that shields you from much of the
low-level detail of machine architecture. However, you will be a
better programmer when you have a clearer picture of the
relationship of Java code to machine level of execution. These
online materials help clarify that relationship.

Review:
Objects/Classes/References:
You must understand the role
of objects,
classes
and references
to understand program development in Java. These online materials
help clarify. They are drawn from Chapter 3 of an earlier
textbook. You must understand these concepts.

Lecture:
Stack versus Heap Memory Allocation: The
terms stack
and
heap
are
technical terms that apply to all programming languages. More
importantly, these two storage patterns influence: 1) Potential
size 2) Scope (visibility) 3) Lifetime (persistence). You need a
deep, intuitive appreciation for these differences. Other
Resources:
You'll find many web-sourced explanations, most of which are wrong
or poorly
phrased.
Here are a couple that are accurate: Stackoverflow,
Wikipedia

Lecture:
Key Elements Needed for Assignment 1: I
will cover a number of essential concepts you'll need for
Assignment 1. You'll probably want to take notes during the
lecture.

No
notes will be posted here. You'll need to take notes during the
lecture.

Lab:
Exercise 3:
Arguments and
the Stack: Arguments
that are passed to methods are copies of values that are received
in variables in the method. These variables are allocated on the
Stack (pushed onto the Stack); these variables disappear when
exiting the method (popped off the stack).

Lab
Exercise 5:
Exploring Single-Dimensioned Arrays:This
sample program explores the differences between arrays of
primitives and an array of objects. You'll need to think about the
garbage
collector as
well.

Lecture:
Getting
Ready for Assignment 2: Inheritance and the
Magic of Virtual Methods: The
use of inheritance
and
virtual
methods
are bothpillars
of
OO programming. During this lecture, I'll explore the magical
power of these.

Lab:
Exercise 6: Class Employee and Related
Subclasses: Soon,
you'll need to create subclasses of Actor,
classes such as Hobbit
and Wizard.
In this exercise you will start with complete and working classes
called Employee
and
Manager.
Manager
is
a specialized class that extendsEmployee.
You will complete the Scientist
class, which also extends
from Employee.

Lecture
Activity: The
Problem with Arrays and the Magic of ArrayList:
We will explore the
following program during the lecture. Ensure that you're ready by
downloading the program and building a project. We can walk
through it together during the lecture. And
What on Earth is a <Generic>?

Lecture:
Working with
jUnit:jUnit
is an industry standard tool you can use to implement systematic
testing procedures. I'm introducing this now in response to
comments from returning Coop students. Their employers expect them
to be familiar with jUnit.

Lab:
Assignment 2: Battlefield Simulator:
Deriving Subclasses from Actor:
You will build on the work you completed for Assignment 1. If you
did not complete Assignment 1, you can use my solution as a
starting point for Assignment 2. I'll publish my solution next
week.
I
have revised the document to include a marking guide and corrected
the data type for stealth
It should be double.

Lab:
Assignment 3: Building an
Army of Actors: You will add two new subclasses of
Actor, then create an Army to manage two collections
of Actor objects: Forces of Light and Forces of
Darkness. My
Solution

Lab:
Exercises
9:Getting Ready
for JavaFX:
I have created three very small Java applications. They all work
in their current form. For each of the three applications, you
must:BUILD
the original project. TEST
to
check the success of your build before
making modifications.FIND
the TODOcomments
(colored in BLUE).
MODIFYthe
code as requested. TEST
to check the success of your modifications.SHOW
YOUR
LAB PROFESSOR for
credit.

Lecture
Activity: Moving
JavaFX Nodes (e.g. an avatar):
The following code is a tiny JavaFX
application
that moves Circle
objects on the screen. We'll
explore this to understand motion in the Battlefield
Simulator.

Lecture:Moving Your Actors on the Battlefield:I
will walk through the implementation of basic movement during the
lecture. I will use the Blackboard Discussion Groups to distribute
packets of code during the lecture.

Lecture:
The Magic of Serialization: I
will explore the Serialization
mechanism using this code. During your lab session next week,
you'll explore Serialization
using a Hexademical Editing tool.

Lecture:
Exception
Handling:
The textbook has a number of very good examples. I will work
through many of these during lecture. If you download the Source
Code, you can preload them into Eclipse and follow along.

Lab:
Exercise 11: Using the Collection
interface:
I have created a small Java program to explore the use of the
Collection
interface
and several known implementing
classes (ArrayList,
LinkedList, TreeSet
and HashSet)
Note:
Only one memory map is required. I revised the PDF to reflect
that.