Lab 3: Geometry Name: ________________________________
Objective: Writing arithmetic expressions
Quiz: Given the followjng declarations, evaluate the following expressions
int n = 5;
int m = -40;
int x = 1.5;
int y = 7.5e-1;
- 2 * n + m
- 2 * (n + m)
- (n - m) % 3
- (x + y) * x + y
- m * x
Getting Started
-
Create a New Project called Geometry in “R:\AP Java\2011-2012\<your id>”
-
Import the files from R:\AP Java\Labs\Lab 3 Geometry
-
Open the Geometry class in the editor
Assignment
-
Change the @revised and @version comments.
-
Modify the program according to the comments in the file:
-
Compile the program and execute the main method.
Wrap-up
-
Print this page and hand in
Grading
| Feature |
Points |
Out of |
Notes |
| Quiz |
|
5 |
|
| Input |
|
3 |
|
| Circle |
|
4 |
|
| Triangle |
|
4 |
|
| Square |
|
4 |
|
| Total |
|
20 |
|
Notes
Comments (0)
You don't have permission to comment on this page.