UMBC CMSC 202, Computer Science II, Fall 1999
Project 1: Linked List (C Implementation)
Due: Thursday, September 23, 1999
See Also Project Notes,
Questions and Answers
Objectives
The objectives of this project are to:
- Implement the coding and documentation standards for this course.
- Use the assert macro.
- Equip a program with debugging aids.
- Review the concepts of dynamic memory allocation and linked lists.
- Use a makefile.
Background
This project introduces you to the use of advanced programming techniques
and coding conventions for this course. This assignment will be done using
C, but will be converted to C++ in a future project. As you look over
the source files used in this project, you should also get a good idea
as to whether or not you have the proper background in C programming to
succeed in this course.
Tasks
- Study the source code which you are given as a starting point. Notice
that some of the functions are incomplete and must be finished by you.
Here are links to the source code:
- Write a makefile that will build an executable from the source files.
Proj1
should be the name of the executable file. The starter source
files should compile without error, although you can expect a warning
about the Find() function. The warning will go away after you fill in
the body of that function.
- Add header comments to each source file. In the .h files, add
comments before each function prototype. Some of these are done for
you. Be sure you have read the
Project Organization page.
- Finish writing the functions that are incomplete. Think first,
code later!
- Test, test, test! As part of your testing, you should try things
that will force pre-conditions to fail. This means you will need to
make temporary changes to main(), but keep in mind that when you turn
in your project, you should use the main() EXACTLY as it appears in
the original
Proj1.c
file.
- For this project, you should submit a makefile and six source files
named as follows:
- Proj1.c
- Date.h
- Student.h
- Student.c
- ClassList.h
- ClassList.c
You will not be able to complete this step until after September 15.
Further instructions will be given for electronic submission of
projects. Do NOT email your project!
Sample Test Data
In addition to testing your program by entering data from the keyboard,
you can "automate" the testing process by running your program and
redirecting input from a file. Edit a simple text file, where each
line contains the data that would be entered by the user. If the
file is called input.dat
, you would run your program
with the following command line:
Proj1 < input.dat
Here is:
- A sample input file
- The output obtained from sample input file
You can use the sample input file for testing purposes, but keep in
mind that your program will be tested with DIFFERENT input data when
it is graded. Also note that the addresses shown in the sample output
will not necessarily match the addresses in your output, and your
addresses may vary from one run to another.