Skip to content

Adhouma/Sets-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sets-challenge

/**
 * 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
 */

Releases

No releases published

Packages

No packages published

Languages