classwork
Class SodaCan

java.lang.Object
  extended by classwork.SodaCan

public class SodaCan
extends java.lang.Object

Models a soda can.

Author:
Tom James

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

height

private int height
The height of the soda can.


radius

private int radius
The radius of the soda can.

Constructor Detail

SodaCan

public SodaCan(int height,
               int radius)
Parameters:
height - The height of the soda can.
radius - The radius of the soda can.
Method Detail

getSurfaceArea

public double getSurfaceArea()
Returns:
The surface area of the soda can.

getVolume

public double getVolume()
Returns:
The volume of the soda can.