|
- 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 both on structured and object oriented
style. While Java is our main tool and thus necessarily we will
devote a large amount of time mastering its syntax and
techniques, our objective will be broader. In other words we
will attempt to learn principles that go beyond Java per se and
hopefully will be useful for other programming languages as
well.
-
-
Text Book: Deitel
& Deitel, "Java, How to Program", 3rd
edition, Prentice Hall, 1999.
-
-
Prerequisites: No
previous knowledge of programming languages is required. However
those of you that are familiar with some other language,
particularly C, 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 mid term exam
(25% of your grade) and one final exam (30% of your grade). The
remaining 45% 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.
-
-
|
|
|
|
- Tentative List of
Topics
|
|
|
|
|
Topic
1 |
Introduction
to Computers: (1.5 lectures)
Computer
architecture: CPU, memory, disks, peripherals, networks
Programming
languages: machine/assembly language, high level language,
compilers, Java virtual Machine
Installing
Java and related software
Files,
folders, editors
.java
and .class files, write and execute a java program
Read:
Chapter 1
|
|
|
Topic
2 |
Anatomy
of Java Programs: (1.5 lectures)
|
|
|
Topic
3 |
Memory
Concepts, variables, simple types, expressions, assignments: (1.5
lectures)
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:
sections 2.4-2.7
|
|
|
Topic
4 |
Control
structures: (3.5 lectures)
if and
if/else statements
while
and do/while statements
for
statement
switch
statement
Code
blocks and scope of variables
Introduction
to the concept of algorithm, flowchart notation
Read:
chapters 4 and 5
Examples:
(generate truth tables? Read numbers online and calculate
statistical values, calculate mathematical functions such as
exp(), sin(), cos() etc.) |
|
|
Topic
5 |
Arrays:
(2 lectures)
Contiguous
blocks of data and their use
Declaration
and initialization of arrays
Looping
over arrays
Multi-dimensional
arrays
Read:
Chapter 7
Examples:
(binary and sequential search, Insertion sort? Matrices?
Rotation? Flip? Representation of graphs/networks?) |
|
|
Topic
6 |
Methods
in depth: (2 lectures)
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
Recursion
Examples:
(Finding kth largest element, Quicksort, binary search
recursive version?) |
|
|
Topic
7 |
Input
and output: (1 lecture)
Read:
To be determined
|
|
|
|
Mid
Term exam |
|
|
Topic
8 |
Classes
and objects: (2.5 lectures)
Declaration
of classes
Fields,
methods, scope
Constructors,
and initialization: new
The
encapsulation pronciple in object oriented programming
Packages
and their use
Private,
package and public protection of data and methods
declaring
objects of a class
UML
notation for classes the Argo/UML package
static/class
members and methods and their use
Examples:
(Employee, linked list, serial numbers)
Read:
Chapter 8
|
|
|
Topic
9 |
Inheritance
and polymorphism: (2.5 lectures)
Subclassing
and inheritance
The
Object class
Protected
members and methods
Overriding
methods, final methods
Polymorphism
and dynamic method binding
Inner
classes
Final
classes
Type
casting
Declaring
objects like: SupClass x=new Subclass();
UML
diagrams and inheritance
Code
reuse
Read:
Sections 9.1-9.7, 9.9-9.14 and handout
Examples
(polymorphism via simple employee class, Detailed analysis of
sorting program independent of type) |
|
|
Topic
10 |
Abstraction:
(2 lectures)
Abstract
classes and methods
Interfaces
Multiple
inheritance via interfaces
Marker
interfaces and their use
instanceOf
method
Wrapper
classes
Read:
sections 9.14-9.22
Examples
(Queue and stack declaration using interfaces) |
|
|
Topic
11 (Canceled) |
Exception
handling: (1 lecture)
|
|
|
Topic
12 |
Strings:
(1 lecture)
toString
method and concataneation
substring,
slicing and other String operations
StringBuffer
class versus String (Canceled)
Creating
immutable objects (Canceled)
Read:
Chapter 10
|
|
|
Topic
13 |
Graphics
and GUI: (4 lectures)
Graphics
class and paint()/repaint() methods
Color
and font manipulations
Various
drawings: drawLine, drawString, etc.
Graphics2D
API
Applets
Swing
package and use of Jbuilder software to build GUIs:
Jlabel
Model/view/controller
framework and UI Delegate
Events
and event handling
Organization
of Swing classes
Jbutton
and action events
Jtextfield/JPassword
and related events
JcomboBox,
Jlist,
Mouse
events
Adapters
Layout
management
Panels
and Panes
Read:
Chapter 11, 3, 12, (possibly parts of chapter 13)
Examples:
(Dice example, GUI shop? GUI for sort? Animate sort? Histogram?) |
|
|
Topic
14 (Canceled) |
Data
structures and Java Collections framework: (2 lectures)
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
Algorithms
in Collection class
Read:
Chapter 22, chapter 24 and sections 23.8-23.9
|
|
|
12/20/00 |
Final
exam |