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

Previous Q& A

  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..

  Program reads the contents of employees

Design a program that reads the contents of the employees.dat file and prints all the data within it. Format the report as designated in the Printer Spacing Chart below.

  Ethical issues in information systems

Ethical Issues in Information Systems- Choose one (1) ethics issue, You may also use the Internet or the Strayer Library to research articles on ethical issues in information systems and choose one (1) ethics issue of interest to you

  Explain areas of information technology as a metric

The confidentiality, integrity, availability (CIA) triad represents generic security goals. CIA is typically applied to specific areas of information technology as a metric or guideline for establishing or maintaining security.

  Network implementation plan

Network Implementation Plan-After a network has been installed and becomes operational, the system must be maintained. An important part of an implementation plan is preparation for the operation of the network and the potential problems that migh..

  Display the commands

Display the commands(s) used to do the following (and show the results): see the df command to view file system use in megabytes.

  Research organizational benefits of using databases and dbms

Research organizational benefits of using databases and DBMS's. Supplement your research with a review of your lessons. Post a response to the discussion board: Respond to the following statements and, if appropriate, include personal experience as..

Reviews

Write a Review

 

Similar Q& A

  Write a c++ program to calculate closet points from a list

Write a C++ program to calculate the closet points from a list. Output will be the name of 2 points Your input format will be : name x-value y-value The following is the input to test your program. A 10 50 B 30 70 C 20 40 D 40 10 E 30 20 F 20 50..

  Explain how speech recognition works in detail

Explain how speech recognition works in detail. Explain the electronics and mathematical models used

  Make the table in the format

Make the table in the format : table_name

  How many of the bits in a 6 bit unsigned number

Design a logic circuit to figure out how many of the bits in a 6 bit unsigned number equal 1. Design the simplest possible circuit to accomplish this.

  Explaining difficulties in managing information resources

Considering difficulties in managing information resources, explain in scholarly detail why risk management must involve in the following elements to include threats,

  Compare the memory management systems of windows

Compare the memory management systems of Windows (recent versions, after Win 2000) and Linux from the pagination/segmentation point of view.

  Write a program that reads a sentace and counts the number

write a program that reads a sentace and counts the number of alpha characters using the tolower or toupper function along with the isalpha function. Then count vowels using a switch statement. Then i have to give the total number of keystrokes.

  Write files which do not reside at root or master directory

Provide the example of names of three files from own computer that do not reside at the root or master directory. For each file, list both therelative filename and its complete filename.

  Provide a proof or a counterexample

We showed that since the problem concerning a machine halting on its own index is unsolvable, the general halting problem for Turing machines is unsolvable. Does this imply that any superset of an unsolvable problem is unsolvable? Provide a proof ..

  Find the minimum product of sumsexpression

Use algebraic manipulation to find the minimum product of sumsexpression for: (x1 + x3 + x4)(x1 + x2' +x3)(x1 + x2' + x3' + x4). Where ' stands for not.

  Identify the basic operation of the following algorithm

Identify the basic operation of the following algorithm (that takes as input an array A[0... n-1] of n integers) and analyze its worst-case time complexity.

  Write one function that reads the input using alias paramete

Write one function that reads the input using alias parameters (reference parameters).Write a second function that calculates the pay amount. If the salesperson owes money, thereturn amount from the function is a negative number.

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