This lab is due by Tuesday, September 15, 2020, 11:59 PM.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.
Pair Programming
For this lab, you will be working with a partner to practice pair programming and proper programming design. You and your partner will implement any two of these equations of your choosing.
# | Major | Equation | Formula |
1 | Chemistry | Ideal Gas Law | |
2 | Civil Engineering | Average Acceleration | |
3 | Electrical Engineering | Ohm's Law | |
4 | Engineering Physics | Newton's Law of Universal Gravitational | |
5 | Math | Distance | |
6 | Math | Volume Sphere | |
7 | Mechanical Engineering | Deflection | |
8 | Mechanical Engineering | Heat Transfer | |
9 | Mechanical Engineering | Stress | |
10 | Mining | Shear Stress | |
11 | Physics | Coulomb's Law | |
12 | Physics | Force | |
13 | Physics | Velocity |
For each equation, you must:
- Define the appropriate variables that are needed giving them the proper data type, a proper identifier, and a sensible initial value
- Declare constants as needed
- You must prompt the user to enter all non-constant values for the equations
- Calculate the right hand side of the equation solving for the left hand side
- Print out the final computed value of the equation
- And as always, be sure to be providing helpful output to the user so the user provides the correct values and knows what is being returned
Now before you get started doing any coding, take out a piece of
paper and write out the pseudocode to solve this task. Once you have your pseudocode, determine who is
going to drive first and get to coding! We will switch drivers every 5
minutes so listen for the cue to switch positions.
At the end of this lab, your program output should look similar to below:
Enter the acceleration: 4.33
Enter the mass: 9.3
The force is: 40.269
Enter the width: 4
Enter the height: 2
The area is: 8
Lab Submission
You will submit your solution to this lab with the rest of Set2. Detailed instructions for doing this are posted in Assignment 2.
This lab is due by Tuesday, September 15, 2020, 11:59 PM.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.