Class Rock

java.lang.Object
  extended byRock

public class Rock
extends Object

This class models a rock that has a certain mass.


Constructor Summary
Rock(double m)
          Initialize a Rock object with the given mass in kilograms.
 
Method Summary
 double getMass()
          Return the mass of this Rock in kilograms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Rock

public Rock(double m)
Initialize a Rock object with the given mass in kilograms.

Parameters:
m - the mass in kilograms
Method Detail

getMass

public double getMass()
Return the mass of this Rock in kilograms.

Returns:
the mass of this Rock in kilograms.