Question: This code is for c++ Planet In this assignment you will be creating a base class and derived class to perform some batic calculations for
Planet In this assignment you will be creating a base class and derived class to perform some batic calculations for planets. For the base class, create a ciass for a sphere. This class will store the radis of the sphere (private). it wilf need to have an accessor and mutator for the radius. You ciass should aiso have a constructor and functions to calculate surface area and volume. Your planet class will be dertied from your sphere class. It should add mast as a privale member (with mutator and accessor) along with a constrictor and functions to calculate density and aoceleration due to gravity at the surface. Functions for input and display are optionat. Using this class, write a program that will prompt the user for the redus and mass of a planel. Your program wil display the surface ares, density and accoleration due to graviby at the suriace
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
