Class Summaries

While I will maintain on the class website a collection of the "artifacts" used during each class section (power point slides, code examples, etc.) this is often a poor way to get a quick overview of what was done in class each day. I would strongly encourage you to use this page as a place for a one-paragraph overview of what was done in class each day and links to any supporting materials (of my creation, your creation, or third party creation) that you feel fits in with the class session.

  • Monday, January 12th

Intro to the class. Schafer introduced himself. Explained the details.

  • Wednesday, January 14

Schafer introduced Object Oriented Programming (OOP) and compared it to writing a trashy western novel. He also introduced us to objects, states and behaviors. We discussed objects are members of classes? Objects have states, behaviors and identity. Objects interact with other objects by their behaviors; methods are a type of behavior. Some different types of methods are accessor, mutators, constructors and destructors. Also, we covered a little on subclasses and how they extend classes and in the case of villians extending humans.

  • Friday, January 16

Schafer introduced java and how to use it with the example used on Wednesday of the Western Town.

WesternTown.java

/**
*
* class :WesternTown
* comments: The class that models a western town
*
* @author Class Example
* @version 2009-01-16
*/

public class WesternTown
{
    int numOfStables;
    int numOfSallons;
    int numOfSheriffs;
    int numOfTroubleMakers;
    String location;
    String year;

    public WesternTown()
    {
        numOfStables = 3;
        location = "Western America";
        year = "1850";
        numOfSallons = 0;
        numOfSheriffs=0;
        numOfTroubleMakers = 0;
    }

    public void PrintTown()
    {
        System.out.println("This town is set in " + year
            + " in " + location);
    }
}

Book.java

/** 
* Good header block
*/

public class Book
{
    public static void main(String[] args)
    {
        WesternTown sweetyPost = new WesternTown();
        sweetPost.numOfSallons = 2;
        sweetPost.numOfSheriffs = 1;
        sweetPost.numOfTroubleMakers = 5;
    }
}
  • Monday, January 19, 2009

Schafer continued the western town examples and introduced the print method.
system.out.println("put text here");

  • Wednesday, January 21, 2009

Schafer discussed Primitive data types (p.77) and reference data types (p88) and encapsulation.

  • Friday, January 23, 2009

Schafer continued discussing reference data types, introduced the Java API (link from class website), and overloading.

  • Wednesday, January 28, 2009

Schafer introduced class:Die,discussed the use of Math.random (),Class Random, and casting in java.

  • Friday, January 30, 2009

Schafer introduced software testing. He divided testing into two types, positive testing, and negative testing. Shafer also introduced us to JUnit for testing. Using JUnit, Shafer discussed examples of testing class Die.

  • Monday, February 2, 2009

Schafer continued with software testing with JUnit and specifically used HW1 and presented the common errors as well as errors we might not of thought about when programming our assignment. Discussed the differences between "black box" testing and "white(clear) box testing" Starting on the topic of good/bad design.

  • Wednesday, February 4, 2009

Schafer covered how to create good design and a few of the different methods in properly designing a system. We covered the steps involved in good design. We covered the CDC method of coming up with classes and their responisibilities. Also, UML to a lesser extent, and the different types of class diagrams and their uses.

  • Friday, February 6, 2009

Schafer used a coffee machine example to illustrate the Principle of Continuity. How to make code reusable where small changes are make in design should result in small changes in code. By adding soup for example, if the original implementation was designed well enough only a few changes were needed.

  • Monday, February 9, 2009

Schafer continued with design, and introduced a new design pattern called Model–View–Controller (MVC). Then, Schafer divided us into two groups to discuss the JUnit test code we did for HW2.

  • Wednesday, February 11, 2009

We went over more design and testing of HW2 and what is expected. Discussed a little on Homework #3 and different ways to implement and code the Bulls and Cows program.

  • Friday, February 13, 2009

We discussed a little more on different ways to code the Bulls and Cows program. We also covered the String[] args method of inputting at command line.

  • Monday, February 16, 2009

At the start of class Schafer handed back HW3, and talked about how he evaluated it. Then, Schafer discussed how to use final declarations. After that, Schafer continued with args. Schafer then introduced java BufferedReader method. Finally, Schafer introduced the Try and Catch block.

  • Wednesday, February 18, 2009

Schafer continued explaining java BufferedReaders, introduced inheritance, and a program with GUI.

  • Friday, February 20, 2009

After reviewing items for the test, Schafer continued with discussion on inheritance by creating a new type of Accumulator. He also had 4 things to consider when adding a inherited class - declare the class, declare the new data, create constructors, and adjust the methods.

  • Monday, February 23, 2009

Continuing on with inheritance we discussed how subclasses are subsituted for their parents. We discussed the difference between overload and override and he explained the YO-YO effect.

  • Wednesday, February 25, 2009

Continued to talk about inheritance, talked about extending access to methods but not locking down methods. We also talked about how to merge CD, DVD, and Database classes to reduce code reuse.

  • Friday February 27, 2009

After discussing the exam and homework assignments, Schafer finished his lecture on two different situations of inheritance, making a child or developing a parent over two similar defined methods. Then the class discussed two different student designs of the Bulls and Cows game.

  • Monday, March 23, 2009

Schafer started the class talking about the Cannon Game application, and then we answered questions about it. After that, he talked about Event-Driven Programming, and then he introduced The Cannon World.

  • Wednesday, March 25, 2009

Schafer talked about listeners in the Cannon World application, Listeners Implement Interfaces (how do we create one) and then listeners as Inner Classes.

  • Friday March 27, 2009

Schafer talked about Layout managers and discussed Grid Layout, Flow Layout, Card Layout, and GridBag Layout. We also covered how to create grids within grids.

  • Monday March 30, 2009

Schafer started class answering questions. Then, he introduced PinBall game, and spent most of the time talking about the idea of creating MouseEvent and how it works.

  • Wednesday, April 1, 2009

Schafer discussed the double buffering hack of using a JPanel that utilizes buffering instead of a JFrame that doesn't. Schafer discussed using Vectors for threading and ArrayList when not.

  • Friday April 3rd, 2009

Schafer continued on PinBallGame V.2 .Then he moved on to threads, and introduced the key word synchronized to help prevent conflict between threads. He discussed advantages and disadvantages of using synchronized. After that, he introduced the 3rd version of PinBallGame. Finally, Schafer talked about the new HW assignment

  • Monday April 6, 2009

We discussed HW9 and then we did small-group activity.

  • Wednesday, April 8, 2009

We discussed Abstract Calsses and developed a shape program where you could paint any 2D shape. We also discussed FrameWorks.

  • Friday April 10 , 2009

we had group activity about inheritance. Schafer handed out a sheet about ArrayList. We began to discuss how to make a set by extending an Arraylist but encountered problems with functionallity not needed.

  • Monday April 13 , 2009

Schafer started class talking about Exam2. Then, he talked about the next assignment HW 11. After that, Schafer discussed inheritance and substitutability, then introduced inheritance types. Finally, he talked about the use of composition and how limitation and construction are bad and break the substitutability of inheritance.

  • Wednesday, April 15, 2009

We reviewed for the Exam on Friday, and Schafer introduced Design Patterns, specifically the Decorator design pattern.

  • Monday April 20 , 2009

Schafer handed back assignment 10 and then he gave a lecture on Decorator and its work.

  • Wednesday April 22, 2009

Schafer handed back test 2 and then covered the idea of design patterns along with examples.

  • Friday April 24 , 2009

Schafer discussed Java I/O specifically the Buffered Reader decorator and discussed Buffered Writer and Print Writer

  • Monday April 27, 2009

We finished talking about File I/O and began talking about Network Programming.

  • Wednesday April 29, 2009

We went over network programming and saw an example of eliza working with client and server programs.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License