Java Programming Project
Document Sample


Java Programming Project
You are to design and create a program to simulate a calculator. The calculator should be
able to do these operations:
CLR reset the register to zero
+ add the number entered to the register
- subtract the number entered from the register
* multiply the register by the number entered
/ divide the register by the number entered
RESET reset the register to the number entered
We will first build a character-based interface for the calculator, then a graphical
interface (with buttons like on a real calculator). So, the code that does the actual
calculations should not read any input or print any output.
We will do the project in phases. Each phase has an assignment which you will complete
and be graded on before you go on to the next phase. The phases and the points assigned
to each are:
1. Use cases – 20 points
2. Calculator class design (attributes and methods) – 20 points
3. Code for Calculator methods (including unit testing) – 40 points
4. Character Interface – 40 points
5. GUI (Graphical) Interface – 40 points
For this project, you will work with an assigned partner. This is called pair
programming. When you and your partner work in eclipse, one person will type while
the other watches and makes suggestions. You will switch roles every day. Studies on
pair programming have shown that students learn from each other, and professional
programmers write code faster and with fewer errors.
The first step in building a system is to write use cases. Complete the steps we followed
when we designed the ticket machine, by filling in the handout. Talk with your partner
about how the calculator should work, and look at a real calculator or the Windows
calculator to get ideas.
Related docs
Other docs by jcc96858
Get documents about "