|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jimmc.spelsim.Planet
A representation of a planet.
Constructor Summary | |
Planet()
Create a planet object. |
Method Summary | |
double |
getDensity()
Get the density of the planet based on its radius and mass. |
double |
getGravity()
Get the surface gravity of the planet. |
double |
getMass()
Get the mass of the planet. |
double |
getPeriod()
Get the rotation period of the planet. |
static Planet |
getPlanet(java.lang.String name)
Get a planet with preset values. |
static java.lang.String[] |
getPlanetNames()
Get the list of known planet names. |
double |
getRadius()
Get the radius of the planet. |
double |
getSynchronousAltitude()
Get the altitude of synchronous orbit. |
void |
setMass(double mass)
Set the mass of the planet. |
void |
setPeriod(double period)
Set the rotation period of the planet. |
void |
setRadius(double radius)
Set the radius of the planet. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Planet()
Method Detail |
public static Planet getPlanet(java.lang.String name)
public static java.lang.String[] getPlanetNames()
public void setMass(double mass)
mass
- The mass of the planet in kg.public double getMass()
public void setRadius(double radius)
radius
- The radius of the planet in meters.public double getRadius()
public void setPeriod(double period)
period
- The rotation period of the planet
in meters per second-squared.public double getPeriod()
public double getGravity()
public double getDensity()
public double getSynchronousAltitude()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |