
CS389 Software Engineering Weekly Assignments
Spring 2005
Week 1: Jan. 23 – Jan 29
1. Read Chapter 1 of the textbook.
2. Review, understand, and run Java source code files ShowException.java,
ReadInputDemo.java, StringTokenizerDemo.java, and CollectionDemo.java.
3. Answer the following question by responding to my Weekly Question 1 thread
• Can we ever build large software applications with the same level of
confidence about their quality as civil engineers can on their bridges? Why?
Week 2: Jan. 30 – Feb. 5
1. Read Chapter 2 of the textbook.
2. Review, understand, and run Java code files InheritanceDemo.java,
InterfaceDemo.java, StaticDemo.java, TestThreads.java,
PiggyBankWithoutSynch.java, and PiggyBankWithSynch.
3. Write a Java program to determine whether the input string is a palindrome. A
palindrome is a string that reads the same no matter you read it from left to right
or from right to left. You should take advantage of class java.util.Stack. You may
need to use some methods of String or Stack that are new to you. Learn to use
Java online documentation at http://java.sun.com/j2se/1.4.2/docs/api/ to find the
necessary information. (Hint: You need String’s methods length() and charAt(int).
You need to convert char into Character object, with Character’s constructor, and
convert a Character object into a char value by Character’s method charValue().
You need to know how to cask a general java.lang.Object object into a Character
object.)
4. Answer the following question to my Weekly Question 1 thread
• Can we ever prove that a program is correct by conducting thorough
debugging and testing? If yes, why? If not, why all companies spend lots
of resources in debugging and testing?
Week 3: Feb. 6 – Feb. 12
1. Read Chapter 3 of the textbook.
2. Read, understand, and run Java programs "StaticDemo.java",
"ReflectionDemo.java", "AreaServer.java", and "AreaClient.java".
3. Write client/server programs "AccuServer.java" and "AccuClient.java" where the
server supports the function of a method "int addTo(int v)" for reporting the
accumulated argument values for the method since the start of the client session.
The server should be able to serve up to 100 concurrent clients a time. The
programs should use a default port number for the server's server socket, and also