UMBC CMSC 202
UMBC CMSC 202 CSEE | 202 | current 202

Project 1 Design

Due Date

Objective

The objective of this assignment is to make sure that you begin thinking about your project in a serious way early. This will not only give you experience doing design work, but will help you anticipate the number of hours that you'll need to set aside to be able to complete the project.

The Assignment

Your design assignment is broken down into two parts.
  1. Function prototypes for any function you plan to provide. Full function header comments must be provided. Be sure to pay particular attention to the quality of your Pre-conditions and Post-conditions - make sure that they are specific and communicate the appropriate information to a reader/user of the function.

  2. A list of tests cases you plan to run to verify that your program works properly. You must specify at least 10 tests. Each test must address a different aspect of your program. E.g., you may not list more than one test that relates to validating one piece of input from the user, nor can all of your test cases deal with validating user input. Think about how you would test individual functions? Often programmers write test-code that will exercise their functions and verify the results - it does not end up being included in the final release.

    Recall that test cases are SPECIFIC and MEASURABLE - with 100% certainty you can say "my program has passed this test". You can describe a test case with 3 pieces of information:

    Example: Let us assume we are testing the following function that accepts a non-empty string s and a positive integer n and returns the character of the string that is in the nth position:

    char getNthChar(int n, string s) { if (n < 0 || n >= s.length) return '\n'; else if (s.length == 0) return '\n'; return s.at(n); } Examples of good test cases would be (there are MANY more):
    Description Input Expected Output
    INVALID: Negative value for n n = -1
    s = "anything"
    '\n'
    INVALID: Too large value for n n = 10
    s = "anything"
    '\n'
    VALID: first character in string n = 0
    s = "anything"
    'a'
    VALID: last character in string n = 7
    s = "anything"
    'g'
    INVALID: one past end of string n = 8
    s = "anything"
    '\n'

    NOTE: These ALL deal with the same variable - so you could only use one of them. However, they should give you a good idea as to what we are looking for. This list of test cases that you generate represent a small part of the set of tests that you should run on your program EVERY TIME you make a modification to your code. Even if all you do is add a comment, you should run ALL of the tests again - you never know when a small mistype will result in your program no longer compiling!

    A template for your design document, p1design.txt, is provided in Ms. Wortman's public directory. Copy that file

    /afs/umbc.edu/users/d/a/dana3/pub/CMSC202/p1/p1design.txt to your local directory and fill in the necessary information. Submit your modified p1design.txt file to complete this assignment.

    Grading

    You p1design.txt file will count as 10% of your project 1 grade (part of the Correctness). If this file is not submitted by its due date, or if you submit a new version after its due date, you will lose all 10 points.

    Your p1design.txt file will be compared to the header file or files that you submit when Project 1 is due. Minor changes to the design are allowed. A minor change might be changing the way in which one or two parameters are passed or even the removal, splitting or addition of one function.

    If there are major changes between the design document and the header files that are part of the final project, you will lose 5 points. This would indicate that you didn't give sufficient thought to your design before beginning the implementation.


    Last Modified: Saturday, 17-Sep-2005 01:46:08 EDT