/**
* Create a HeavenlyBody class that demonstrate planets on the solar system
* The HeavenlyBody fields are:
* - name (String)
* - orbitalPeriod (double)
* - satellites (Set)
*
* Create a addMoon method that allows you to add a moon of the type HeavenlyBody to the satellites
*
* In the Main class:
* Create a Map called solarSystem <String, HeavenlyBody> as the key is the planet name
* Create Set called planets contains the planets
*
* Try to add as many as you want planets to the solarSystem and to the planets Set
* Try adding duplicate planets
* PS: Duplicate planets are ignored in Set
*
* Find a solution to ignore duplicate planets
*/
-
Notifications
You must be signed in to change notification settings - Fork 0
Adhouma/Sets-challenge
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Java Sets challenge
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published