Hi all,I have attached two files the first one ( assignment 1) is program that I want you to work on. I have attached the second one ( assignment 1) to let you know that you have to add a header includes my name and my class.My name: Bandar AlqahtaniClass: CS 120CS 120
Bruce Bolden
June 21, 2016
Programming Assignment #2
10 Points
Due: June 24, 2016
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/s)
Earth 9.81
Moon 1.63
Mars 3.71
Outline of solution:
1. Display standard output information using the ShowProgramHeader()
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).
• 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.
minimal set of test cases for your program.
lations should be done before you start programming and used as a
attach a page showing your sample calculations. These sample calcu-
have any questions regarding
you have plenty of time to get help if you need it.
contact me. Start working on this assignment as soon as possible, so that
this assignment, do not hesitate to
CS 120
Bruce Bolden
June 14, 2016
Programming Assignment #1
10 Points
June 17, 2016
Objective Become familiar with the C++ compiler/environment that you
plan to use for the programming assignments in this class. I strongly recom-
mend using the Unix system as we discussed in class.
My name: Bandar Saeed Al Qahtani
Get the “Hello, world!” program working.
• Add a function (ShowProgramHeader() as described in lecture) to print
your name and class information before the “Hello, world!” message.
Note: This will be required on all future assignments.
The following changes should generate compiler errors/warnings. If it does,
record the message; if it does not, record that. Turn this record in with your
• Remove the semi-colon from the output statement in main().
• Comment out the using namespace std; statement. Use either a
block comment or an in-line comment. Is there a difference?
• Comment out the #include (#include on
older compilers) statement. Use either a block comment or an in-line
comment. Is there a difference?
• Change the double quotes that enclose the Hello, world! message to
single quotes.
Change the
Purchase answer to see full

Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.