|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectclasswork.SodaCan
public class SodaCan
Models a soda can.
| Field Summary | |
|---|---|
private int |
height
The height of the soda can. |
private int |
radius
The radius of the soda can. |
| Constructor Summary | |
|---|---|
SodaCan(int height,
int radius)
|
|
| Method Summary | |
|---|---|
double |
getSurfaceArea()
|
double |
getVolume()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int height
private int radius
| Constructor Detail |
|---|
public SodaCan(int height,
int radius)
height - The height of the soda can.radius - The radius of the soda can.| Method Detail |
|---|
public double getSurfaceArea()
public double getVolume()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||