Resources

Syllabus

The syllabus for this course is here.

NetBeans 7.0

The software we will be using for this course is NetBeans 7.0, Java EE Edition. To install NetBeans on Windows you will first need to download and install the Java JDK 6. Mac OS X users should already have Java installed: to confirm this, open a terminal window and type "java -version". Once you have installed the JDK, you can download and install the Java EE edition of NetBeans 7.0. During the installation process you should make sure that you select the options to install the GlassFish server and JUnit. You will not need to install Tomcat.

Java API Documentation

Documentation for many of the Java classes we will be using in this course is available online here.


Monday, Sept. 12

I give an introductory lecture on object-oriented design principles. Here also are some definitions of design terms I will be using this term.

Reading for today is sections (11.4 and 11.5 in the Seventh Edition) or (14.4 and 14.5 in the Eighth Edition).

First Programming Assignment

Complete the program described in the lecture notes for Monday. This assignment is due by the start of class on Friday, Sept. 16.

Wednesday, Sept. 14

To supplement the material I showed on Monday, here is a short sample program that demonstrates how to use the Scanner class to read data from a file.

Basics of GUIs: I showed an example that shows how to set up a simple GUI with buttons and text fields with Java code. You can read more about the parts of a simple GUI in the text in sections (13.4, 13.5, 13.8, 15.3 and 16.6 Seventh Edition) or (12.4, 12.5, 12.6, 16.3 and 17.6 Eighth Edition).

Friday, Sept. 16

Using the NetBeans visual design tools to construct simple GUIs: I showed two examples. The first example shows how to set up a simple GUI with text fields and buttons. This example is equivalent to the example developed in the NetBeans tutorial "Introduction to GUI Building". The second example shows how to use menus and dialog boxes.

Second Programming Assignment

Change the phone lookup application from the first assignment into a GUI application. Details and specific instructions are here. This assignment is due by the start of class on Wednesday, Sept. 21.

Monday, Sept. 19

Creating custom components - I showed two examples. The clock example is a custom component that displays a clock. This example is based on the author's StillClock class. The key handling example shows how to respond to key events.

Reading for today is sections (14.1 through 14.12 and 15.5 7th edition) or (15.1 through 15.10 and 16.11 8th edition).

Wednesday, Sept. 21

I gave a brief overview of how to use the ArrayList class to store lists of objects. I spoke about Bezier curves and began the process of building an application that would allow a user to sketch and manipulate drawings made up of Bezier curves. The project for that application is here. That project demonstrates how to use MouseListeners to implement mouse interaction in a custom component.

Reading for today is section (15.4 7th Edition) or (16.10 8th Edition)

Third Programming Assignment

Following the outline given at the end of the notes on Bezier curves modify the Curve Tracer application to make a more full-featured drawing program. This assignment is due by the start of class on Wednesday, Sept. 28.

Friday, Sept. 23

Some useful dialogs in the Java class library. You can read more about these dialogs in the text in sections (34.6 and 34.9 7th Edition) or (34.6 and 34.9 8th Edition).

I also talked about Exceptions and showed a number of examples from the text. Reading for this material is (chapter 18 7th Edition) or (chapter 13 8th Edition).

Monday, Sept. 26

Working with JLists: here are version one and version two of the application described in these notes.

I also talked about binary files and showed a number of examples from the text. Reading for this material is (sections 19.1 through 19.6 7th Edition) or (sections 19.1 through 19.6 8th Edition).

Wednesday, Sept. 28

I discussed how to work with time in a Java program.

Fourth Programming Assignment

The next assignment is to write a GUI program to manage a small library. This is a group project that you will complete with a partner. The program is due by the start of class on Friday, Oct. 7. We will have in-class work days on Friday and Monday to work on the project. To make the most of these work days, you should start on the project right away so you can develop meaningful issues to work on in class on the first work day.

Friday, Sept. 30 and Monday, Oct. 3

Open work days for the group project. Work on the project in class.

Wednesday, Oct. 5

Threads - I showed several examples from the textbook. Reading is sections 29.1 through 29.11, 7th or 8th edition.

Friday, Oct. 7

Basics of Networking. I began the discussion of networking by showing a couple of basic examples from the text. Reading is sections 30.1-30.4 in either edition.

Monday, Oct. 10

I showed an extended example of a network application, a simple client-server email system. Here are lecture notes and the project folder.

Fifth Programming Assignment

Write a simple client-server chat application. This assignment is due on Monday, Oct. 17.

First Midterm Exam

Here are topics to review for this exam.

Friday, Oct. 14

Introduction to SQL - here is a guide to getting started with SQL databases. Reading is sections 37.1 through 37.5 in the text, both editions.

Monday, Oct. 17

I showed an extended example of an application that uses JDBC. Full lecture notes are available here.

Wednesday, Oct. 19

I discussed the next assignment and showed an example application that demonstrates how to populate a JTable and a combo box with data pulled from a database. As a bonus, here are some more SQL and JDBC techniques.

Sixth Programming Assignment

Construct a database-based system to store and display quotations. This assignment is due on Wednesday, Oct. 26.

Getting ready for web applications

In the next section of the course we will be working with web applications. To write web applications you will need to make sure that you have the Java EE edition of NetBeans installed on your computer. (This is the edition I recommended you install at start of the term.) This edition of NetBeans includes GlassFish, a web application server. All of the examples in this portion of the course will run as applications in GlassFish.

The web section of the course will require that you have at least a rudimentary working knowledge of HTML. If you have little or no experience with HTML, you might want to read the HTML tutorial that the author provided. For more information on HTML and HTML forms, here is an HTML tutorial and a guide to HTML forms.

Monday, Oct. 24

Web applications and servlets: here is a basic first example. The textbook material on Servlets is in a supplement provided online by the author: Chapter 39.

Wednesday, Oct. 26

Servlets, databases, and sessions. I showed some of the servlet examples from chapter 39 that demonstrate how to use a database with servlets and use hidden fields, cookies, and sessions. Reading is the rest of Chapter 39.

Seventh Programming Assignment

Construct a simple web application driven by servlets and a database that administers an arithmetic quiz. This assignment is due on Wednesday, Nov. 2.

Friday, Oct. 28

Introduction to JavaServer Faces - for the JSF portion of the course we are moving beyond the textbook. I will be posting extensive lecture notes that will cover those aspects of JSF that we will need for this course. The first couple of examples covering the basics of JSF are the Hello, World example and an example demonstrating the use of action methods and databases in JSF.

Monday, Oct. 31 and Wednesday, Nov. 2

More about JSF - working with lists and tables and a complete example of a JSF web application.

Final Programming Assignment

Build a startup using JSF: construct a software system that could be used to run a TaskRabbit business. This will be a group project with groups of three students per team. The project is due on the last day of classes, and each group will be asked to give a short presentation demonstrating their site software.

More JSF Documentation

Here are some additional sources of JSF documentation: documentation on JSF tags is here. You can find documentation on the classes used in JSF here.

Second Midterm Exam

The second midterm exam is coming up on Friday, Nov. 4. This exam will cover threads, networking, databases, and servlets. Here is a list of topics to study for the exam.

Monday, Nov. 7

Open work day for the final assignment. Here are two snippets of useful information about the TaskRabbit system you are building: a word about system boundaries and some words about how to handle time in JDBC.

I also showed a simple demo of a web application that uses the PrimeFaces library to implement a calendar component.

Wednesday, Nov. 9

To facilitate sharing code with other members of your group, you should use a version control system. I have prepared a handy how-to guide that will show you how to do this in NetBeans.

Note that this will help you to share source code, but your group will still need to work out some way to share access to your project's database.

Final Exam

The final exam will be on Tuesday, Nov. 22 from 11:30-2:00. Here is a review sheet to help you prepare.

Bonus Example

Here is the simple animation example I showed in class.