Computer Science Using C++

Ch. 14 Programming Assignment

  1. Ch14Proj1

    Write a program that declares a vector of ten floating-point values (use doubles). Have the program prompt the user for each of the ten values and store all of them into the vector. The program should then report how many of the values entered are larger than the very first value that was entered. For example, if the values entered are 5.2, 6.1, 2.8, 8.9, 3.3, 2.0, 9.7. 1.4, 7.3, and 5.5, the program should report that 5 of the values in the vector (besides the first one of course) are larger than the value of the first element.

    You must use an apvector rather than a C++ array. Your program must follow the Wyo Area Comp Sci Documentation & Coding Standards. Place a copy of Ch14Proj1.cpp in your Submit folder so that the instructor can execute your program within that folder. Be sure that any #include compiler directives have valid paths so that the instructor will not have linking errors.

    Preconditions:

    You must hand in the following on separate pages stapled in this specified order:
    1. The hardcopy source code for this assignment. Staple multiple pages together, if applicable.
    2. The typed pseudocode that you used to write out your C++ code. Please type this neatly following the specified template.
    3. The typed test plan (following the Excel template) that you developed before writing out the code. The test plan must include several reasonable inputs as well as boundary and any other special values. You should include as many test cases as necessary so that the test plan is thorough.


    Here are two example test plan items:


Computer Science Using C++ Home Page | Mr. Minich's Wyo Home Page