MSIS 22:198:605 , Fall 2003 Class meets on Tuesdays 6-9, room 161 of RUTCOR on Busch Campus

Last changed: 12/01/2003, 14:30:49

    Instructor: Farid Alizadeh

    Office: Room 105, RUTCOR Bldg. Busch (732)445-4857


    Office hours: Tuesdays 9:00 PM after class or by appointment






Java Code Examples

Text Books:
Required Text: “The Java Tutorial”, Third Edition, available online at
Required Text: “Schaum's outline of UML”, by S. Bennett, J. Skelton, and K. Lunn, McGraw-Hill Schaum sereis, 2001 (can be had from and

Required URL: Java Application Programming Interface API (click on the link)

Overview: Our goal in this course is to learn in some depth the principles of programming and software development using the language Java. The emphasis will be on object oriented (OO) style. In particular we will study the principles of object oriented design using the UML modeling language. We will cover the OO principles such as inheritance, polymorphism, encapsulation, modularity, and OO patterns
Recommneded Text: “The JFC Swing Tutorial”, available online at

Prerequisites: No previous knowledge of programming languages is required. However those of you that are familiar with some other language, particularly C or a C derivative, will have an easier ride in the first few weeks. You need to have access to a personal computer (Windows, Mac or Unix will all work.) You need to be able to download and install software on this machine. You also need to have access to internet.

Home works, exams and grading: We will have one final exam (40% of your grade). The remaining 60% is determined by the programming projects. Please note: Programming projects are the heart and soul of this course. Without doing them you will not be able to learn anything from this course. Therefore, I insist that you make your best efforts to do them all. To enforce this we have the following rule:

No one will be able to pass this course if they fail to hand in more than one homework assignment. Furthermore no one will pass the course if their cumulative point from programming assignments is less than 60% of total possible points. In other words if the maximum possible points from programs is, say 400, then you can not pass the course if your score from these programs is less than 240. These rules stand regardless of your score from the exams.

Attendance: is required. You are responsible for all information that is communicated in class whether procedural (such as changes in due dates, exam dates, etc. ) or course contents (lectures, changes in syllabus, corrections, etc.) If you think you will miss more than two lectures you should reconsider registering for this course.

Tentative List of Topics

As of Wed 27/Aug 03

Topic 1

Introduction to Computer Architecture, Programming Languages: 0.5 lecture (09/02)

    Computer architecture: CPU, memory, disks, peripherals, networks

    Programming languages: machine/assembly language, high level language, compilers

    Programming: From writing to compiling to running, architecture dependence

    Read: Notes

Topic 2

Introduction to Java: How to get the compilers, How to write compile and run Java Programs: 0.5 lecture (09/02)

    Java virtual machine and architecture indpendence

    *.java and *.class files, write and execute a java program

    How to download Java compiler, editors, virtual machine, IDE (Jbuilder, Netbean)

    Step by step example of writing a Java program, then compiling and running it

    Read: Chapter 1 of tutorial

As of 9/1/03

Topic 3

Anatomy of Java Programs: 1 lecture (9/09)


    Data and fields



    Dissection and detailed examination of simple java program

    Read: Chapter 1 pages 32-41

As of 9/1/03

Topic 4

Memory Concepts, variables, simple types, expressions, assignments: 1 lecture (9/16)

    Notion of memory, variables and declarations

    Numerical types/operations/expressions

    Character types/ operations/expressions

    Boolean types/expressions/operations + truth tables

    Introduction to Strings

    Final variables

    Read: Chapter 3 of Tutorial pages 65-98

As of 12/01/03

Topic 5

Control structures: 1 lecture (9/23)

    if and if/else statements

    while and do/while statements (not covered yet and not in mid term exam)

    for statement

    Code blocks and scope of variables

    Read: Chapter 3: “Control Flow Statements” pages 99-118

As of 12/1/03

Topic 6

Methods in depth: 1 lecture (9/23, 9/30)

    Definition, parameters, return values, void type

    Notion of call by value, final parameters

    Invoking methods others have written, invoking Java API, Math class

    Notion of modular design

    Method overloading and use


    Notion of algorithm

    Read: Notes and study examples in Java Code Examples page for and the three alternative, and You may also want to jump ahead and study the following sections on Chapter 5: “Creating Classes”, pages 178-203

As of 12/1/03

Topic 7

Classes and Objects 1 lecture (9/30, 10/7)

    Declaration of classes

    Fields, methods, scope

    Constructors, and initialization: Using new

    Read: Chapter 4 of the Tutorial section “The Life Cycle of an Object”

As of 12/1/03

Topic 8

An Overview of Object Oriented Programming: Encapsulation 1 lecture (10/7)

    The encapsulation principle in object oriented programming

    Packages and their use

    Private, package and public protection of data and methods

    Declaring objects of a class

    Strings and arrays

    Memory allocation for objects, comparison and copying objects

    Read: Chapters 2 and 4 of the Tutorial

As of 12/1/03

Topic 9

Object Oriented Programming in Detail Inheritance and abstraction: 2 lectures (10/14, 10/21)

    Static/class members and methods and their use

    Principles and Overview : Encapsulation, Modularity, Inheritance , Abstraction polymorphism,

    Subclassing and inheritance

    UML notation for classes the Argo/UML package

    The object Class

    Protected members and methods

    Overriding methods, final methods

    Polymorphism and dynamic method binding

    Inner classes

    Final classes

    Type casting

    UML class diagrams: inheritance and composition

    Code reuse

    Abstract classes and methods


    Multiple inheritance via interfaces

    Marker interfaces and their use

    instanceOf method

    Wrapper classes

    Read: Chapters 2, 5, 6 of the Tutorial and UML Chaptes 1,2,4,5

As of 12/1/03

Topic 10

Exception handling: (0.5 lecture) Cancelled!

    Read: Chapter 7

As of 9/1/03

Topic 11

Graphics and GUI: (3 lectures)

    Swing package and use of Jbuilder software to build GUIs:

    Organization of Swing classes

    Jbutton and action events

    Jtextfield/JPassword and related events

    JcomboBox and JRadioButton

    Events and event handling

    Mouse events


    Layout management

    Panels and Panes

    Read: Chapter 10 of the tutorial

Examples: (GUI examples in JavaCode page)

Topic 12 Canceled!

Data structures and Java Collections framework: (1 lecture)

    Notion of data structures

    Review of Lists, adding and deleting from lists

    Stacks and queues, push and pop, add and take

    Binary search trees and tree searching

    Brief discussion of hash table and notion of hashing

    Java Collections framework

    Collection, Set and Map interfaces

    Abstract and concrete classes

    Iterators (iterator pattern)

    Algorithms in Collection class

    As of 12/1/03 (Final revision)

    Final exam: December 9 6-8:30 PM in RUTCOR lecture