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, | Welcome and introduction to the course: objectives, topics, expectations, conduct; Programming as a problem solving activity;
| Send an e-mail to muresan@scils.rutgers.edu specifying your surname, first name, prefered email address and eden account name. | |
| * 2 * Mon, | 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, | Loops and Logic - a review. | Horton: ch.3 | Solutions to exercises in ch.03. Homework: Ex. 4-5, p.169 (Horton) -> Ex/Ch04/Strings.java,Reverse.java |
* 4 * Mon, | 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, | 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, | Classes - advanced issues (a closer
look at constructors and initialization); 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, | 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, | President's Day (forced by snow) holiday; no classes. | ||
* 9 * Wed, | Review Polymorphism and Dynamic Binding on the Animals example; the use of UML diagrams. Interfaces - a review; 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, | Inner classes. Nested classes, local classes,
anonymous classes; Discuss the Polyline example. | ||
* 11 * Wed, |
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, |
Exceptions Understanding streams |
Horton: ch.7, ch.8. | Solutions to exercises in ch.07. Solutions to exercises in ch.08. |
* 13 * Wed, |
Accessing files and directories
|
Horton: ch.9. | Solutions to exercises in ch.09. |
* 14 * Mon, |
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, |
Reading and writing for the I/O assignment |
Horton: ch.11. | |
* 16 * Mon, |
Spring break; no classes. | No responsibilities :-). | |
* 17 * Wed, |
Spring break; no classes. | No responsibilities :-). | |
* 18 * Mon, |
Dealing with collections |
Horton: ch.13. | Homework: Ex. 3, 4, p.548 (Horton) -> Ex/Ch13/*/*.java Solutions to exercises in ch.13. |
* 19 * Wed, |
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, |
Elements of OO design Discussion of the aplication used in the assignment |
Horton: ch.14. | |
* 21 * Wed, |
Introduction to threads BankAccountTest.java, TryThread.java, TryThread1.java, ThisThread.java, JumbleNames.java, Threads.java |
Horton: ch.15. | |
* 22 * Mon, |
University closed by snow, no classes. |
||
* 23 * Wed, |
Managing threads |
Horton: ch.15. | Assignment on streams due. |
* 24 * Mon, |
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, |
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, |
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, |
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, |
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, |
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, Slides in HTML and PDF |
Working on projects Q & A Introduction to Web applications Displaying webpages with JTextPane |
||
* 31 * Wed, |
Final assignment due. |