You are here

Detailed Lab Instructions

5 February, 2015 - 11:20

Read and follow the directions below carefully, and perform the steps in the order listed.

  • Navigate to your sub-folder: Chapter 02 and print the: Solution Lab 01 Pseudocode.txt and the: Solution Lab 01 Test Data.txt files. Review the printouts in conjunction with your Lab 01 source code file. Note: In Lab 01 we gave you step by step directions for modifying the Compiler Test.cpp source code file into the Lab 01.cpp source code file. I could have given you the pseudocode and test data files, but you had not received any instructions about them. Now, after having studied the Chapter 2 materials, these files should make sense.
  • Make copies of the: Solution Lab 01 Pseudocode.txt and Solution Lab 01 Test Data.txt and rename them: Lab 02 Pseudocode.txt and Lab 02 Test Data.txt
  • Here is the problem. Your local bank has many customers who save their change and periodically bring it in for deposit. The customers have sorted the coins (pennies, nickels, dimes and quarters forget half dollars and dollar coins) and know how many (an integer data type) of each value they have but have evolved (or their environment has made them lazy). They have lost their ability to do simple arithmetic. They can't seem to determine the total value of all of the coins without a calculator (or computer). Write a program to interact with the customers and to determine and report the total value of their coins.
  • No! No! No! We are not going to write a program (create source code) using the C++ programming language. We are going to design a plan for a program using pseudocode as our model. Additionally, we need to develop some test data for use in testing our model.
  • Start your text editor (Microsoft Notepad. Set the font on Notepad to: Courier 12 font because Courier uses the same amount of space horizontally for each letter. It will make the information in the files show as it should be seen. Open your Lab 02 pseudocode text file. Change all items as needed to be able to solve the above problem. NOTE: You may use any application software that will let you open, modify and save ASCII text files. You may even use the Bloodshed Dev-C++ 5 compiler/IDE software to view, modify and save ASCII text files; after all, our source code files are ASCII text files with a special extension of .cpp
  • Open your Lab 02 test data text file. Modify the text file as appropriate. Use your test data and step through your pseudocode. Does everything seem to work? Have you missed something?
  • When you are satisfed that you have your program plan and test data completed, close your text files. That's right, I said, "Save and close your text files." Files should be properly closed before being used by other software and this includes the Operating System software that moves, copies and renames files.
  • After you have successfully written this program, if you are taking this course for college credit, follow the instructions from your professor/instructor for submitting it for grading.