CS150 -- Lab 6: Arabian Legends



->Courses
->CS150
-->Homework
-->Lab 1
-->Lab 2
-->Lab 3
-->Lab 4
-->Lab 5
->Lab 6
-->Lab 7
->Electronic Submission
->Old Exams
->C++ Examples
->MSVC Info
->Software
->Tentative Schedule
->Course Policies

[Courses]
[Rich][Home][Rich]
[Author]

Fall Quarter 2000

Overview

In this lab, you will generate a table displaying information related to an old Arabian legend.

Acknowledgement

This laboratory assignment is based on an exercise from Program Development and Design Using C++, 2nd ed. by Gary Bronson.

Procedure

A story is told of a wealthy king who agreed to give a beggar one cent the first day. For sixty-three additional days the king agreed to double the amount given on the previous day. Write a program that displays the amount of money the king must pay on each of the sixty-four days. Your program is required to make use a vector to store the amount paid each day. Your program should display the results as follows:

Day     Amount Paid
===     ===========
  1            0.01
  2            0.02
  3            0.04
  .             .  
  .             .  
  .             .  
 64             .  

Do you think this king was an MSOE graduate?

Lab Report (due beginning of week 9 lab)

The lab report should be self-contained. That is, it should be possible for someone to understand what you did and why without seeing anything other than your report. Your report should include:

  • Purpose
  • Problem Statement
  • Procedure (include the steps in your design procedure, reasons for your design decisions, etc.)
  • Documented source code (you may wish to include this at the end of your report)
  • Sample output from your program
  • Conclusions (problems you encountered, what you learned, suggestions of how the lab could have been better, things you would have done differently, etc.)

Your report should be typed, and as with any report you submit, correct spelling and grammar are required. Be sure to keep copies of all your files, in case something gets lost. It may be wise to keep a diskette backup as well.

Your grade will depend on quality of design and clarity of the code and documentation, as well as whether your program produces the correct results. If you have any questions, consult the instructor.

Office: CC-27C, Phone: 277-7339
Last Updated: October 23, 2000
© 2000 Dr. Christopher C. Taylor