CSCI 261 - Programming Concepts (C++)

Fall 2017 - Lab 2A

Quick Links: Canvas | CS @ Mines | Cloud9 | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |
This lab is due by Tuesday, September 12, 2017 11:59 PM .

Pair Programming



For this lab, you will be working with a partner to practice pair programming and proper programming design.

Last week, you thought of equations relevant to your major that can be solved using a computer program. Below are a list of equations provided by your classmates. You and your partner will implement two of these equations.

Major Equation Formula
Chemistry Ideal Gas Law Ideal Gas Law
Civil Engineering Average Acceleration Average Acceleration
Engineering Physics Newton's Law of Universal Gravitational Newton's Law of Universal Gravitational
Math Distance Distance
Math Volume Sphere Volume of a Sphere
Mechanical Engineering Deflection Deflection
Mechanical Engineering Heat Transfer Heat Transfer
Mining Shear Stress Shear Stress
Physics Coulomb's Law Coulombs Law

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. Put your names (first & last) at the top as you will be turning in your pseudocode as part of your grade. 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.


Lab Submission



To receive full credit for this lab, you must do the following:
  • Turn in a hardcopy of your pseudocode to the instructor at the end of class on Wed. Aug. 30
  • Both members of your pair must turn in the same main.cpp
  • Both of your names should be in the comments in the header of your file
You will submit your solution to this lab with the rest of A2. Detailed instructions for doing this are posted in Assignment 2.


This lab is due by Tuesday, September 12, 2017 11:59 PM .
Last Updated: 08/25/17 11:25


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0