|
This page documents what we do in class. It contains Java programs that we will discuss in class, simple homework exercises that you can work on for practice and exam preparation (not for credit), and reading assignments from our textbook.
The reading assignments and practice problems are listed by the date on which they were assigned. The sample program files are listed by the date on which they were used. You can click on either a .java link and see the source code, or click on a .html link (when available) and see an applet running. When you are viewing the source code, you can use your browser's "File -> Save As..." menu item to save a copy of the file on your computer. It is a good idea for you to "play" with these example programs; compile them, run them, make simple changes to them and compile and run them again.
|
- Thursday, May 4.
- Tuesday, May 2.
- Thursday, April 27.
- Tuesday, April 25.
- Thursday, April 20.
- Tuesday, April 18.
- AnArithmeticException.java
- AnArrayException.java
- ANullPointerException.java
- ANumberFormatException.java
- NumberFormatExceptionCaught.java
- NumberFormatExceptionCaught2.java
- Read Chapter 14, Sections 14.1, 14.2, 14.4, 14.5, 14.6, 14.8.
- Do Exercises 14.5, 14.7, 14.9, 14.13, 14.15.
- Thursday, April 13.
- The following four programs are nice demonstrations of layout managers and panels.
- The following program solves Exercise 12.8 from page 621 of the textbook (and the next three give close, but not quite correct, solutions). This exercise is very similar to Homework Assignment 7.
- AppletWithTabs.java,
AppletWithTabs.html
- Read Chapter 13, Sections 13.1, 13.2, 13.3, 13.6, 13.7, 13.8, 13.9, 13.10, 13.11. (We are not going to cover these sections in too much detail. What's important is to know about these ideas and to know where to look up the details).
- Tuesday, April 11.
- Thursday, April 6.
- Here is a brief outline of the Java GUI framework.
- SomeComponentsAWT.java,
SomeComponentsAWT.html
- SomeComponentsSwing.java,
SomeComponentsSwing.html
- SomeComponentsLookAndFeel.java,
SomeComponentsLookAndFeel.html
- Read Chapter 12, Sections 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.14.
- Tuesday, April 4.
- Thursday, March 29.
- Browse through the Java documentation for the StringBuffer class. In particular, read the descriptions of the instance methods in the class (there are about 15 of them, not counting overloaded methods).
- Read Chapter 10, Sections 10.13, 10.14, 10.15, 10.16, 10.17, 10.18.
- TestStringBufferStuff.java
- For next week, read Chapter 11. (This chapter is mostly reference material. It is very interesting and useful, but there are not a lot of concepts in it).
- Tuesday, March 27.
- Browse through the Java documentation for the String class. In particular, read the descriptions of the instance methods in the class (there are about 25 of them, not counting overloaded methods).
- Read Chapter 10, Sections 10.2, 10.3, 10.4, 10.5, 10.7, 10.8, 10.9, 10.10.
- TestStringStuff.java
- Thursday, March 23.
- Tuesday, March 21.
- Thursday, March 9.
- Tuesday, March 7.
- Tuesday, February 29.
- Here is a practice exam for the exam on Thursday.
- Here is a list of commands for the jdb debugger that comes with the Java JDK.
- Thursday, February 24.
- Tuesday, February 22.
- Thursday, February 17.
- Tuesday, February 15.
- Thursday, February 10.
- Tuesday, February 8.
- Thursday, February 3.
- Tuesday, February 1.
- Thursday, January 27.
- Read Chapter 6, sections 6.2, 6.3, 6.4, 6.5, 6.6, 6.7.
- WhileCounter.java,
WhileCounter.html.
- ForCounter.java,
ForCounter.html.
- Here are two short C programs that show how C handles conditionals differently from Java. These examples show why Java has the boolean data type.
- Here is a template file that you can use for testing small fragments of Java code. Keep this file somewhere where you can access it easily.
- Tuesday, January 25.
- Read Chapter 5, sections 5.2, 5.3, 5.4, 5.9, 5.10.
- Do Exercises 5.2, 5.3ab, 5.4ac, 5.5, 5.15, 5.24.
- WelcomeApplet.java,
WelcomeApplet.html.
- WelcomeApplet2.java,
WelcomeApplet2.html.
- WelcomeLines.java,
WelcomeLines.html.
- Here is a template file that you can use for writing simple applets. (You will also need an HTML file with an applet tag.)
- Thursday, January 20.
- Read Chapter 4, sections 4.7, 4.8, 4.9, 4.11, 4.12, 4.13.
- Do Exercises 4.9, 4.10, 4.19, 4.21, 4.28.
- Read Chapter 3, sections 3.1, 3.2, 3.3, 3.4, 3.5.
- Addition.java
- Comparison.java
- Average1.java
- Average2.java
- Tuesday, January 18.
- Read Chapter 1, sections 1.7, 1.8, 1.9, 1.13, 1.14.
- Read Chapter 2, pages 36--62.
- Do Exercises 2.9, 2.11, 2.13, 2.14, 2.22-2.25.
- Read Chapter 4, sections 4.4, 4.5, 4.6.
- Welcome1.java
- Welcome2.java
- Welcome3.java
- Welcome4.java
|
|
|
|