Question: 1. At the Linux command line type mkdir lab1. This will create a new directory named lab1. Work out of this directory. In order to

1. At the Linux command line type mkdir lab1. This will create a new directory named lab1. Work out of this directory. In order to do that, type cd lab1. This changes the current working directory to the directory lab1. 2. If you have created the directory lab1, then just type cd lab1. 3. Copy the file fallMoon.exe in the directory /class/cse1222/5059/lab1 by typing cp /class/cse1222/5059/lab1/fallMoon.exe . Be sure to include 5059 (this is your course section indicator) and the period, .. 4. Copy the file projectileDist.exe in the directory /class/cse1222/5059/lab1 by typing cp /class/cse1222/5059/lab1/projectileDist.exe . Be sure to include 5059 (this is your course section indicator) and the period, .. Programming Assignment 1. Create a new file fallMoon.cpp which will contain a program to compute the falling distance and velocity on the moon. The program should read in the time in second s. The formula for the velocity after t seconds is: velocity = g * t where g = 1.6 meters per second^2 and t is the time in seconds. The formula for the distance after t seconds is: distance = (1/2) * velocity * t Write your program using the following initial code: // File: fallMoon.cpp // Created by: Your Name // Created on: Creation Date /* Place your comment here */ #include using namespace std; int main() { /* Place your solution here */ return(0); } Replace Your name with your name, Creation Date with todays date, Place your comment here with a comment that briefly specifies what problem your program solves, and Place your solution here with your C++ code. Use single line comments where appropriate. Your program must produce exactly the same output as illustrated in fallMoon.exe on the same inputs values. Compile and run your program and check it against fallMoon.exe. 2. Create a new file projectileDist.cpp which will contain a program to compute the horizontal distance travelled by a projectile shot at a 45 degree angle with an initial velocity v on earth. The program should read in the initial velocity v (in meters per second.) The formula for the horizontal distance travelled is: distance = v2/g where g = 9.81 meters per second^2. Compute v2 with the expression v * v. Write your program using the program template given for Part 1 (fallMoon.cpp) of this assignment. Change File on the first line to say projectileDist.cpp instead. Make any other appropriate changes to your program including the Creation Date, Place Your Comment Here, and Place Your Solution Here. Use single line comments where appropriate. Your program must produce exactly the same output as illustrated in projectileDist.exe on the same inputs values. Compile and run your program and check it against projectileDist.exe.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!