Homework 2

Function Design is Due: Wed, Feb 7

Program is Due: Wed, Feb 14

Use the Filename: homework2.cpp

To be done in established groups

Your job is to complete the program homework2.cpp that can be found in your Cs111-2 mapped network drive or via the above web page link. Read the program comments carefully so that you understand what it is supposed to do. Note that parts of the program have already been written for you. DO NOT CHANGE any part of the program that has already been written. (Imagine that your boss, a systems analyst, has come up with this design, had it partially coded, and expects you to follow the design as given.) Any comments that contain *** are simply notes to tell you what to do. Delete these comments once you have finished the program. Also add you names and the revision date to the top. Delete the contributors and references lines unless you use them. Leave the rest of the existing comments unchanged.

This is a game program that runs in a DOS window. You can run my final version of the game, as it can be found in your Cs111-2 network drive. When in doubt about what your program should do, run my program. Of course, all I gave you is the executable file; you have no source code to look at. If we had more time, we could write a nice Windows graphical interface where we would draw the items on the game board, add sounds, etc. (Some of this may be covered in the CS 221 course.)

You will notice that all you need to do is to write 6 functions and to call them where indicated. Divide up the work so that each person does 2 functions. Whoever writes a function should put his/her name in the comment section for that function. That way I will know who the author is for the purpose of assigning grades. The 6 functions perform the following actions:

Use good program style as outlined in our Web pages. This includes proper indenting, aligning of opening and closing brackets, reasonable spacing to improve readability, meaningful variable names, etc. For documentation provide the comment section for your functions. Use the Given, Task, Return style of comments for the function.

Your function design is due anytime on Wed, Feb 7, and should consist of the function headers (complete with parameters and return type) and Given, Task, Return comments. No code is to be given yet for the functions. Put this function design in a file called design2.cpp and copy it to your Hw111-2 mapped network drive (only one submission per group). Check this file later to read your instructor's comments on your design. This is to be sure that you are on the right track with this homework assignment. Your function design document will count for 15% of the homework grade. Don't skip it!

The program can be turned in anytime on the due date. Submit your homework2.cpp file by copying it to your Hw111-2 mapped network drive.

Part of the goal of this assignment is to learn to work together on a team project. Be particularly attentive to communicating with each other, whether in person, via email, etc. (You are encouraged to exchange email addresses to make communication easier.)