In your previous programming assignment, you created a class to store information about a single player in a video game. In this assignment, you will create a "CreatureList" class that contains a linked list of typical creatures you might expect in a video game (e.g. Zerglings in Starcraft). If you have ever played a "creature fighting" game, you know that the number of creatures in the game varies significantly and they move all over the board in semi-random directions fighting each other. Hence, a linked list is ideal for storing information about the creatures that are currently alive. Your "CreatureList" class must contain the following operations:
It is beyond the scope of this assignment to implement a real video game using your CreatureList class. Instead, you will be given a simple main program that makes a sequence of calls to the methods listed above to verify that they are working correctly.
For this assignment, you will start with a "skeleton" program creature.cpp that has a very simple "CreatureNode" class with information about the creatures stored in public variables. This program also includes the definition of the "CreatureList" class. Your task will be to complete and test the empty methods of the CreatureList class. A sample main program is provided as a starting point. You can add other method calls to test specific situations as needed. Since the goal of the assignment is to learn about linked lists, you are NOT required to implement a full game with the CreatureList class.
You can implement this program using either a bottom-up approach or a top-down approach. If you go for a bottom-up approach, start by creating basic methods and classes, and test theses methods using a simple main program that calls each method. When this is working, you can create the main program that uses these methods to solve the problem above.
If you go for a top-down approach, start by creating your main program that reads user input, and calls empty methods to pretend to solve the problem. Then add in the code for these methods one at a time. This way, you will get an idea of how the whole program will work before you dive into the details of implementing each method and class.
Regardless of which technique you choose to use, you should always develop your code incrementally adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete. Also, remember to keep backup versions of your code, so you always have a version to fall back on if you accidentally delete your code or your changes do not work out.
Test your program to check that it operates correctly for all of the requirements listed above. Also check for the error handling capabilities of the code. You are required to include your testing results in your project report to demonstrate that your program works correctly. To do this use the "script" command to save all program input/output in a "typescript" file, and cut and paste from this ascii file into your program documentation.
When you have completed your C++ program, use the "Programming Report Template" on the class website to document your programming project. This report has separate sections to describe the problem statement, your design decisions, your implementation process, and your testing results. Each of these sections should be 1-2 paragraphs long, so your completed report will be 2-3 pages long once you have included your testing output.
In this class, we will be using electronic project submission to make sure that all students hand their programming projects and labs on time, and to perform automatic analysis of all programs that are submitted. When you have completed the tasks above go to the class web site to "Upload" your documentation (a single docx file), and your C++ program (a single ascii text file).
The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit:
You will receive partial credit for all programs that compile even if they do not meet all program requirements, so handing projects in on time is highly recommended.