Calculate and display the weight of the object

Assignment Help Basic Computer Science
Reference no: EM13761796

Objective: Become more familiar with C++ I/O, computations in C++, and the C++ development environment you are using for this class.

Description: Write a program that calculates the weight of an object on the Earth, Moon, and Mars. Specifically, your final program will choose from a menu to determine the gravity (m/s2) an object is on, then will read the mass of the object (kg), then calculate and display the weight (N) of the object on that body.

Useful information:

W = mg

Body

g (m/s2)

Earth

9.81

Moon

1.63

Mars

3.71

Outline of solution:

1. Display standard output information using the ShowProgramHeader 0 function to print your required output information. (Remember to call the ShowProgramHeader() function from from your main function.)

2. Display body choice menu.

3. Prompt user for body (input).

4. Read body choice (a number is probably easiest).

5. Prompt user for the mass of the object (input).

6. Read the mass.

7. Calculate the weight (body dependent).

8. Print input values and mass (show all units).

Deliverables:

  • Program-fully documented.
  • Output:

- Show intermediate steps in the development of your program.

- Test your final program using at least three different values for the mass: 10, 50, and 250 kg.

If you have any questions regarding this assignment, do not hesitate to contact me. Start working on this assignment as soon as possible, so that you have plenty of time to get help if you need it.

Reference no: EM13761796

Questions Cloud

What does the lord offer his sheep : What does the Lord offer his sheep, and what must the sheep do in return, in Psalm 23?Psychological Realism is a method of writing a story in whic?
The united states and has sales opportunities in a foreign : Assume the role of Marketing Manager. Select a product (good or service) that is sold in the United States and has sales opportunities in a foreign market. Apply your critical thinking skills and the knowledge you have acquired throughout this course..
Product versus period costs and fixed versus variable costs : At a dinner party you hosted, a friend of yours who is a college accounting professor-upon hearing you had started your own business-told you to make sure to properly categorize product versus period costs and fixed versus variable costs. The frie..
Draw an aoa network diagram representing the project : Draw an AOA network diagram representing the project. Put the node numbers in circles and draw arrows from node to node, labeling each arrow with the activity letter and estimated time.
Calculate and display the weight of the object : Write a program that calculates the weight of an object on the Earth, Moon, and Mars. Specifically, your final program will choose from a menu to determine the gravity then calculate and display the weight of the object on that body.
What is the highest expense for business operations : 1.What is the highest expense for business operations? How can managers monitor and keep this cost as low as possible? Explain. 2. What is the highest expense for business materials? How can managers monitor and keep this cost as low as possible? Exp..
Reorganizations and consolidated tax returns : Suppose you are a CPA, and you have a corporate client that has been operating for several years. The company is considering expansion through reorganizations.
Diesel engine designer watches can be extremely sturdy : Diesel engine is surely an Italian firm as their principal earnings emanates from offering apparel. These are renowned pertaining to Skinny jeans and also other equipment which have been geared towards diesel watches impacting your junior. The cor..
Encryption requirements as stated in the law : Identify ONE law, either a US Federal Law or a US state law, that requires the use of encryption to protect either consumer or corporate information from unauthorized disclosure. Write a 150+ word plain English summary in which you address the fol..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Pipelined machine versus the single cycle machine

What is the speedup of the pipelined machine versus the single cycle machine assuming there are no stalls?What is the speedup of the pipelined machine versus the single cycle machine if the pipeline stalls 1 cycle for 30% of the instructions?

  Responsibility to maintain ethical standard in department

Do managers have a responsibility to maintain an ethical standard within a department? If so, how is the expected ethical standard established? How is it documented? How is compliance measured?

  What are the advantages of flash memory over hard disk

1. what are the advantages of flash memory over hard disk storage? what are the advantages of hard disk over flash

  Is the java source filename extension

is the Java source filename extension? What is the Java bytecode filename extension?

  Waterfall model for software development

Describe the waterfall model for software development and list three of its advantages for software development.

  Several problems in accessing sales data effectively

U.S. Sports Fanatics has several problems in accessing sales data effectively and in a timely fashion because of its very basic paper-based process, causing it to lose out to its competition.

  Http server may initiate interaction client true or false

In HTTP, a server may initiate an interaction with the client. a)Answer True b)False

  What is bitmap indexing

What is bitmap indexing? Create a relation with two columns and sixteen

  Return array contains the exact same numbers as given array

Return an array that contains the exact same numbers as the given array, but rearranged so that all the even numbers come before all the odd numbers. Other than that, the numbers can be in any order.

  Security management in global environment

This is the third section of your Research Project paper. The major research question or hypothesis is derived from the problem statement. The research question or hypothesis is almost always broken down into applicable and manageable sub-questions o..

  Global data distribution

Global Data Distribution

  The preferred method of interacting with a computer

Graphical User Interface (GUI) became the preferred method of interacting with a computer system. Beginning with the Xerox-developed GUI in 1970, GUI-based platforms have evolved from the Apple Macintosh to the Microsoft Windows operating syste..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd