Schedule for 04:547:202 (2)

(The schedule is subject to alterations, according to how fast we move in class.
The topics that we are going to cover are those from Horton's textbook.)

Note. The webpage for Programming I is still up; you may want to review the Java examples from there.

Class Topics / Activities Resources
(Readings before class)
Students' responsibilities
(During and/or after class)

* 1 *

Wed,
Jan 22

Slides in HTML and PDF

Welcome and introduction to the course: objectives, topics, expectations, conduct;

Programming as a problem solving activity;


Admin, photo-taking

  Send an e-mail to muresan@scils.rutgers.edu specifying your surname, first name, prefered email address and eden account name.

* 2 *

Mon,
Jan 27

Slides in HTML and PDF

Intro to Java - a review.

Programs, data, variables and calculation - a review.

Horton: Introduction, ch.1, ch.2

Solutions to exercises in ch.02.

Homework: Ex. 3-4, p.118 (Horton) -> Ex/Ch03/Lottery.java,Consonants.java

* 3 *

Wed,
Jan 29

Slides in HTML and PDF

Loops and Logic - a review.

Assert.java, TryAssert.java.

Horton: ch.3

Solutions to exercises in ch.03.

Homework: Ex. 4-5, p.169 (Horton) -> Ex/Ch04/Strings.java,Reverse.java

* 4 *

Mon,
Feb 3n 29

Slides in HTML and PDF

Arrays and Strings - a review.
Horton: ch.4

Solutions to exercises in ch.04.

Homework: Ex. 1, p.232 (Horton) -> Ex/Ch05/Rect.java

* 5 *

Wed,
Feb 5

Slides in HTML and PDF

Defining Classes - a review. Horton: ch.5

Solutions to exercises in ch.05.

Homework: Ex. 1, p.293 (Horton) -> Ex/Ch06/Shapes/*.java

* 6 *

Mon,
Feb 10

Slides in HTML and PDF

Classes - advanced issues (a closer look at constructors and initialization);
EmployeeTest.java;
Sphere1.java, CreateSpheres1.java; Sphere2.java, CreateSpheres2.java; Sphere3.java, CreateSpheres3.java; ConstructorTest.java; Creature.java; TryFormat.java.

Extending Classes - a review.

Horton: ch.5, 6

Solutions to exercises in ch.06.

Homework: Ex. 2, p.293 (Horton) -> Ex/Ch06/Shapes/*.java

* 7 *

Wed,
Feb 12

Slides in HTML and PDF

Inheritance and Polymorphism - a review.

The Animals example; see DerivedClasses, OverrideBaseMember, CallingBaseMember, Polymorphism, MultiLevelInheritance, Cloning, Casting.

 

Horton: ch.5, 6 Homework: Try ex. 3, 4, 5, p.293 (Horton) -> Ex/Ch06/Shapes/*.java

* 8 *

Mon,
Feb 17

President's Day (forced by snow) holiday; no classes.    

* 9 *

Wed,
Feb 19

Slides in HTML and PDF

Review Polymorphism and Dynamic Binding on the Animals example; the use of UML diagrams.

Interfaces - a review;
EmployeeSortTest.java, TimerTest.java.

Discuss the Shapes homework.

 

Solutions to exercises in ch.06.

Homework: Implement the Polyline example differently (arrays or Vectors, ...) -> Ex/Ch06/Polyline/*.java

* 10 *

Mon,
Feb 24

Slides in HTML and PDF

Inner classes. Nested classes, local classes, anonymous classes;
InnerClassTest.java, LocalInnerClassTest.java, AnonymousInnerClassTest.java, StaticInnerClassTest.java, Threads.java.

Discuss the Polyline example.

   

* 11 *

Wed,
Feb 26

Assignment 1: Java test (in the form of a multiple-choice quiz), concluding the review of elementary Java.

You can bring the textbook, lecture notes, and you can use Forte.

There will be no alternative assignment. Start your car in time !

 

This is an individual assignment. Collaboration will be viewed as cheating !

Here's the quiz. The correct answers are highlighted. (If you think you've found a mistake in my answers, please let me know.)

* 12 *

Mon,
Mar 03

Slides in HTML and PDF

Exceptions

Understanding streams

Horton: ch.7, ch.8.

Solutions to exercises in ch.07.

Solutions to exercises in ch.08.

* 13 *

Wed,
Mar 05

Slides in HTML and PDF

Accessing files and directories

 

Horton: ch.9. Solutions to exercises in ch.09.

* 14 *

Mon,
Mar 10

Slides in HTML and PDF

Writing files

WriteAStringWithViewBuffer.java, WriteAStringOldWay.java

Examples of indexed collection and inverted file.

Horton: ch.10. Homework: Ex. 1, 2, 3, p.232 (Horton) -> Ex/Ch10/*.java

* 15 *

Wed,
Mar 12

Slides in HTML and PDF

Reading and writing for the I/O assignment

MkWebPage1.java

Horton: ch.11.  

* 16 *

Mon,
Mar 17

Spring break; no classes.   No responsibilities :-).

* 17 *

Wed,
Mar 19

Spring break; no classes.   No responsibilities :-).

* 18 *

Mon,
Mar 24

Slides in HTML and PDF

Dealing with collections

EmployeeSortTest1.java, EmployeeSortTest2.java

Horton: ch.13.

Homework: Ex. 3, 4, p.548 (Horton) -> Ex/Ch13/*/*.java

Solutions to exercises in ch.13.

* 19 *

Wed,
Mar 26

Slides in HTML and PDF

The Java collection framework

PeopleLists.java, GenerateIds.java, SetOfItems.java, MapOfEmployees.java

Horton: ch.13.

Assignment on streams and collections posted.

Slides on indexing (HTML and PDF).

Examples of a document collection, an indexed collection and an inverted file.

The class diagram of the indexing software.

The classes that you need to implement: StopWordSet.java, TextFileReaderWriter.java; here's the stopword file.

The full set of Java classes is available in indexing.jar. Note: Unzip it with "jar xvf indexing.jar"; it will create a new directory, IOAssign, containing all the files. Pay attention to Indexer.java, which contains the main method, and which drives the testing.

Here are my solutions: GMStopWordSet.java and GMReaderWriter.java.

* 20 *

Mon,
Mar 31

Elements of OO design

Discussion of the aplication used in the assignment

Horton: ch.14.  

* 21 *

Wed,
Apr 02

Slides in HTML and PDF

Introduction to threads

BankAccountTest.java, TryThread.java, TryThread1.java, ThisThread.java, JumbleNames.java, Threads.java

Horton: ch.15.  

* 22 *

Mon,
Apr 07

University closed by snow, no classes.

   

* 23 *

Wed,
Apr 09

Slides in HTML and PDF

Managing threads

Horton: ch.15. Assignment on streams due.

* 24 *

Mon,
Apr 14

Slides in HTML and PDF

Creating windows

Introduction to AWT and Swing; Components and Containers; JFrame for applications vs. JApplet for applets; Labels and buttons; Layout managers

TryWindow.java, CloseableFrame.java, TryFlowLayout.java, TryBorderLayout.java, TryGridLayout.java, TryBoxLayout.java

Horton: ch.16. Homework: Ex. 1, 2, p.723 (Horton) -> Ex/Ch16/*.java

* 25 *

Wed,
Apr 16

Slides in HTML and PDF

Handling events

Applets vs. applications; AWT and Swing; low-level vs. semantic events; action and item selection events; menus, lists and dialogs.

More Swing components

MyFirstApplet.html, MyFirstApplet.java, DukeApplet.java, DukeApplication.java, DukeCombo.java, AppletWithButton.java, Actions.java, CloseableFrame1.java, CloseableFrame2.java, CloseableFrame3.java, SimpleLabels.java, SimpleButton.java, ToggleButtons.java, CheckBoxes.java, RadioButtons.java

The image files: ballot_box.gif, dining.gif, dogs.gif, exclaim.gif, swing.gif, tricycle.gif.

Horton: ch.16, ch.17.

Homework: Ex. 1, 2, p.783 (Horton) -> Ex/Ch17/*.java

For extra credits: Add some components and functionality to the RadioButtons example, so that the applet looks and works like in the RadioButtonsHw applet

* 26 *

Mon,
Apr 21

Slides in HTML and PDF

Revision: Handling Events

Menus, Actions

SimpleMenu.java, SimpleMenus.java, CheckBoxMenu.java, ActionMenu.java, SaveActionMenu.java

The image files: crab.gif, eagle.gif, new.gif, open.gif, save.gif.

Horton: ch.16, ch.17. Homework: Ex. 3, 4, p.783 (Horton) -> Ex/Ch17/*.java

* 27 *

Wed,
Apr 23

Slides in HTML and PDF

Text components;

Lists and combo-boxes;

Panel and borders.

TextFieldExample.java, TextFieldAction.java, ValidateInput.java, ValidateDocInput.java, Password.java, TextAreaExample.java, WrapText.java, SimpleGUI.java, TextAndButtons.java, SimpleList.java, SelectInList.java, SimpleComboBox.java

Horton: ch.19. Go through the examples, make changes, try to understand how everything works.

* 28 *

Mon,
Apr 28

Slides in HTML and PDF

Discuss the final assignment

Lists

Visual GUI design with Forte

SimpleList.java, SelectInList.java, SimpleComboBox.java, DynamicList.java, JobsList.java, Tennis.java, Players.java, Player.java

Image files: baseball.gif, basketball.gif, beach_umbrella.gif, dining.gif, filmstrip.gif, hockey.gif, mad_hacker.gif, men_at_work.gif, punch.gif, soccer.gif.

Horton: ch.19.

Final assignment posted.

Use 'jar xvf guiAssign.jar' to unzip the classes needed for supporting the interface.

The class diagram may help.

* 29 *

Wed,
Apr 30

Slides in HTML and PDF

Dealing with delay in the GUI

Multithreading, updating the interface from a thread, user feedback, dialog boxes.

SlowOp.java, ThreadedSlowOp.java, BadProgress.java, GoodProgress.java, SlowButGood.java, FileChooserDialog.java

   

* 30 *

Mon,
May 05

Slides in HTML and PDF

Working on projects

Q & A

Introduction to Web applications

Displaying webpages with JTextPane

   

* 31 *

Wed,
May 07

    Final assignment due.