Created
January 30, 2017 10:04
-
-
Save kikoso/76d296e21df2d4c1deafc00bb250afda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class Star { | |
/** | |
* Final and private attributes | |
*/ | |
private final double mass; | |
private final String name; | |
private final Date fDateOfDiscovery; | |
public Planet (double aMass, String aName, Date aDateOfDiscovery) { | |
mass = aMass; | |
name = aName; | |
fDateOfDiscovery = new Date(aDateOfDiscovery.getTime()); | |
} | |
public double getMass() { | |
return mass; | |
} | |
public String getName() { | |
return name; | |
} | |
public Date getDateOfDiscovery() { | |
return new Date(fDateOfDiscovery.getTime()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment