The goal of this practice is to develop a small calculator. It should have only the four basic operations. The following figure shows its appearance.
Steps:
Create the looks of the calculator using the Visual Editor in Eclipse.
Implement each required function.
Run the program and show it to the teacher or monitor.
From the code generate the Object Model, using the EclipseUML plugin.
Comment your code using javadoc, include all required tags (you can find information about it in the Javadoc Reference from Sun).
Also, include specification information (as a comment) for each method. The structure of a method specification consists of three parts (however not all methods have all three parts):
a precondition, what the method requires;
a postcondition, what are the method's effects; (it is never omitted)
a frame condition, what objects the method modifies.
Example:
public StringBuffer reverse() // modifies: this // effects: Reverses the order of the characters contained in the string buffer.
Hand in your model, your code and a picture of your calculator running.
Copyright © 1998-2009 Dilvan Moreira