Question: This programming task must be solved using IntelliJ. We will create an application that will hold data about the universe. It will largely be a

This programming task must be solved using IntelliJ. We will create an application that will hold data about the universe. It will largely be a generalization, but we will create classes and create objects that reflect parts of this. Some data about our solar system that can be used in the thesis can be found here: Exercise 1 We must be able to create planetary systems with associated data, we therefore need some classes to represent a planetary system. To begin with, we define that a planetary system should be able to have several planets, as well as one star. Therefore create 3 classes with instance variables: Planet name, radius, mass Star name, radius, mass, effectiveTemp PlanetSystem name, centerStar, planets The units in the data set for radius and mass will be explained in more detail in exercise 4. Select appropriate data types for the instance variables, as well as appropriate constructors for the classes. Remember to make the instance variables private, and create get and set methods for these (encapsulation). Exercise 2 Create a class called Main.java that will use the classes you just created. Create an object of the PlanetSystem class for our own planetary system called "Solar system", with associated Planet objects and one Star object "Sun". Exercise 3 Implement the toString () method in the classes you created in Exercise 1, create an appropriate printout that provides relevant information about the object. Use this to print information about the planetary system and some of the planets you have created in Main.java.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!