Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1: Add a derived class that will calculate weight conversions to kilograms to Weight_Conversion.cpp The class will have methods that will convert user input

Task 1:

Add a derived class that will calculate weight conversions to kilograms to Weight_Conversion.cpp

The class will have methods that will convert user input in pounds to kilograms.

Update Program with two files.

main.cpp

Weight_Conversion.cpp

Use a class constructor to initialize class values for weight to 100 pounds. Program should let the user know the execution is with a default value for the program. Output all the weight conversions with the default value if the user enters an amount < 0 for weight.

Create a class called Weight. Create getter and setter methods that will solve the problem.

Use main to organize the execution of the program.

Update your program to us a menu that will not close until the user selects quit option.

Program should contain a menu.

Enter 1. For Mercury Weight

(After the user enters 1 the program will output weight converted to Mercury weight. )

Enter 2. For Venus Weight

(After the user enters 1 the program will output weight converted to Venus weight. )

Enter 3. For Mars Weight

Enter 4. For Earth Moon Weight

Enter 5: For all Conversions

Enter 6: To Quit

Create a program that will calculate your weight on Mercury, Venus, Mars, and Earths moon.

Update your previous program.

Create independent return functions that calculate each planetary body independently.

In main() create a menu that controls the program.

The program should bring receive input only in main() and pass values to other parts of the program.

Label the output so it is clear your weight on each independent planetary body.

If the user inputs a weight that is 0 or less the 0, the program should prompt the user Invalid Weight and stop execution.

Please attach snipping photo of your pseudocode / whiteboarding.

Update your program to prompt the user for a second Integer input if the initial value for weight is valid. The input will correspond to the values the user wants to output.

(Use nested if statements and if else ladder to accomplish the task.)

Program should contain a menu.

Enter 1. For Mercury Weight

(After the user enters 1 the program will output weight converted to Mercury weight. )

Enter 2. For Venus Weight

(After the user enters 1 the program will output weight converted to Venus weight. )

Enter 3. For Mars Weight

Enter 4. For Earth Weight

Enter 5: For all Conversions

Please post the correct code with the comments. Please follow the guidelines thoroughly. It should be in C++ language. Thanks,

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions