(Solved) : Write C Program Keep Track Planets Program Display Menu Similar Add Planet Delete Planet S Q42774711 . . .

Write a c++ programthat will keep track of planets. Your program will display a menusimilar to this:

  1. Add Planet
  2. Delete Planet
  3. Search for Planet
  4. List Planets
  5. Sort Planets
  6. Write Planets to File

Your program will bebased on the planet-class you developed for an earlier assignment.It will store the planet’s name, diameter, and mass and store thelist in a vector. Your class will provide functions to calculatethe surface area and density of the planet as well as accelerationdue to gravity at the planet’s surface(g). Assume that planets arespheres.

When displaying anyinformation about a planet (option 3,4,6) – always display name,diameter, mass, density surface area, and g.

For options 2 and 3,the program will prompt the user for the name of the planet toeither search or delete, not the position.

Option 5 will sort theplanets alphabetically by name.

Option 6 will promptthe user for the name of the file to write the output to.

If you insert theplanets into the vector using an insertion sort, then option 5(Sort Planets) is not required.

Expert Answer


Answer to Write a c++ program that will keep track of planets. Your program will display a menu similar to this: Add Planet Delete…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?