CPS 006, Fall 2003, Weekly Programs


Weekly programs are meant to be quick, half- to one-hour problem solving and coding problems. Each assignment typically involves writing one free or one member function that can be uploaded and tested on a variety of different inputs. You can write any additional supporting code you feel is necessary; the only restriction is that your code must be all in one file when you upload it for testing. You can use any Tapestry or standard C++ classes or functions.

You should most likely compile and test your program before uploading it for testing, though you can certainly use the online testing system for compiling as well as testing. However, using the online system will require more time than using your local programming environment. There is no limit on the number of times you can test your program using the online system. When you are finished testing your solution, you should submit for grading using your course's standard submission system.

See the bottom of this page for links to problem statements.

Testing your Code

You should upload a .cpp file that contains no main function when testing, just the function or class described in the problem statement, with the correct class name and method signature. Be sure to #include the appropriate header files (standard C++ or Tapestry) given in the problem description. The test script will tell you if your program fails to compile.

Each time you want to test your code, follow these directions (even if you are testing the same problem over again):

You can put all the functions or classes you are writing for each week in the same file for testing and submitting.

Problem:
Code file:

Problem Statements

  1. Weekly Problems 4, due Wednesday, December 3 by 11:59 pm
    Each problem is worth 10 points. Only solutions that pass all tests may possibly receive full credit.
    This week, only 30 points total are required.
    Submit using the project name weekly04.
    1. Problem Matrix-1: highGameScore
    2. Problem Matrix-2: nameHighScore
    3. Problem Matrix 3: mostHighGames
    4. Problem 3: Alcohol II
    5. Problem Matrix 5: Rat Route
       
  2. Weekly Problems 3, due Sunday, November 9 by 11:59 pm
    Each problem is worth 10 points. Only solutions that pass all tests may possibly receive full credit.
    This week, only 30 points total are required.
    Submit using the project name weekly03.
    1. Problem Vector-1: maxPoints
    2. Problem Vector-2: coins
    3. Problem Vector 3: smallestBox
    4. Problem Vector 4: lastPlayer
    5. Problem Vector 5: payment
       
  3. Weekly Problems 2, due Sunday, September 28 by 11:59 pm
    The loop problems are worth 10 points each and the Date problems are worth 5 points each. Only solutions that pass all tests may possibly receive full credit.
    This week, only 25 points total are required.
    Submit using the project name weekly02.
    1. Problem Loop-0: buildNum
    2. Problem Loop-1: divDigits
    3. Problem Loop-2: freeParks
    4. Problem Date-1: dayNumber
    5. Problem Date-2: dayName
       
  4. Weekly Problems 1, due September 23 by 11:59 pm
    Each problem is worth 10 points. Only solutions that pass all tests may possibly receive full credit.
    This week, only 30 points total are required.
    Submit using the project name weekly01.
    1. Problem Math-1: perimeter
    2. Problem Math-2: yourAge
    3. Problem String-1: squareLength
    4. Problem String-2: prefixSuffix
    5. Problem String-3: seconds
    6. Problem String-4: parseUrl

Submitting the Final Version of your Code

You must submit your code electronically using the directions available here (note, in Eclipse, your code will not compile since it does not have a main function).


Susan H. Rodger
Last modified: Tue Sep 16 10:53:17 EDT 2003