CS180 Project 3
Fall 2010 Assigned: Wednesday October 13, 2010.
Wednesday October 27, 2010
(a) Any questions from the students, and the corresponding answers, are compiled and placed towards the
end of this file.
(b) This is a team project. Each team must consist of two students registered in CS 180. You may find a
partner from CS 180 and jointly work on the project. Only one of you will need to turnin the project. make
sure that both names are in the header comments of the program. You are also allowed to work
independentl as a one-person team though you are encouraged to work in a 2-person team.
This project created by: Tyler Wear
Edited by: Aditya Mathur
Original: October 12, 2010
(a) October 20, 2010. Corrections in the examples table towards the end.
(b) October 29, 2010: Instructions for grading added.
1. Learning objectives
After successfully completing this project, you would have learned
How to map a problem to a Java program.
2. How to layout a GUI that contains a frame, a few panels, buttons and textfields.
3. How to recognize and process events generated when a user clicks on a button or presses the Return (or
Enter) key after typing something in a textfield.
4. How to work in a 2-person team that is charged with writing a computer program.
2. A story [fictional]
The first graders of East Ridge Road Elementary school are worried. Their teacher, Ms.
Shoebockle, a hard teacher of the school, had given them homework. This wasn't
spelling homework, or handwriting homework, this was math. The students didn't know
what to do, it was the first day of school, no one had taught them them any math yet.
They decided to contact the other adults. First they tried their parents, but many were at
work or unwilling to help. Next they tried calling their local government officials, however
they thought it was just a prank and ignored the poor students. They continued their
quest asking NASA, the military, they even got a hold of the president himself. No one
would help though, they were all too busy or thought it was a joke. The students began
to wonder if Ms. Shoebockle had paid off the entire world.
Finally, one of the students remembered that he had a brother that was in college. He
figured it was worth a shot. He picked up the phone, and by mistake, rather than calling
his brother, he called the Purdue department of Computer Science. Upon hearing the
news of the first graders plight, the secretary who took the call rushed to the CS 180
professor and demanded that he have his students write a program to assist the first
graders in completing their homework. The professor decided that he would have his
students make a simple calculator.