Description
Animation Project in C
Purpose: You are to write the code in Visual Studio 2015 for a simple C language console application that holds the data of an animation application (there is no actual animation graphics in the assignment) using a forward list (aka singly-linked list) in dynamic memory for its data.
Part of the code is shown on the next page; it is also on the Web Site in a text file that you can copy and
paste. You MUST use this code without modification (not a single character changed). Your
task is to implement (after the main () function), using C, only the functions that are declared at the top of
the ass0.c file and not add any new ones. All your code is in the file ass0.c.
The Animation is a series of Frames held in a forward list. When the list runs it displays the details of each Frame at intervals of 1 second using the system clock (you are given the code for this).
You can:
• Add a new Frame to the Animation at a position selected by the user
• Delete all the Frames in the Animation
• Run the Animation to show the list of Frame details one after another at 1 second intervals (code supplied)
• Quit
An example of the output of the running application is given at the end. Yours must work identically and produce identical output.
Note the following:
• the file you submit must be named ass0.c,
• dynamic memory management is done with malloc() and free(),
• you can only use functions like strlen() and strcpy() or similar etc. from the standard C library to handle strings of null terminated chars,
• When the application terminates it releases all dynamically allocated memory so it does not have a resource leak (or you lose 30%).
See the Marking Sheet for how you can lose marks, but you will lose at least 60% if:
1. you change the supplied code in any way at all (not a single character)
2. it fails to build in Visual Studio 2015
3. It crashes in normal operation (such as running an empty list etc.)
4. it doesn’t produce the example output.
Part of the code is shown on the next page. You MUST use this code without modification. Your task is to add the implementation of the functions that are declared using the style of the posted Submission Standard. All the code is in a single file named ass0.c.
What to Submit : Use Blackboard to submit this assignment as a zip file containing only the single source code file (ass0.c). The name of the zipped folder must contain your name as a prefix so that I can identify it, for example for CST8219 using my name the file would be WenjingWangAss0CST8219.zip. It is also vital that you include the Cover Information as a file header in your source file. Use comment lines in the file to include the header.
Before you submit the code,
• check that it builds and executes in Visual Studio 2015 as you expect
• make sure you have submitted the correct file
1
CST 8219/8233 – F17 – Assignment #0
Example Output:
MENU
1. Insert a Frame
2. Delete all the Frames
3. Run the Animation
4. Quit
1
Insert a Frame in the Animation
Please enter the Frame filename: Algonquin_1
This is the first Frame in the list
MENU
1. Insert a Frame
2. Delete all the Frames
3. Run the Animation
4. Quit
1
Insert a Frame in the Animation
Please enter the Frame filename: Algonquin_2
There are 1 Frame(s) in the list. Please specify the position (<= 1) to insert at : 1
MENU
1. Insert a Frame
2. Delete all the Frames
3. Run the Animation
4. Quit
1
Insert a Frame in the Animation
Please enter the Frame filename: Algonqun_3
There are 2 Frame(s) in the list. Please specify the position (<= 2) to insert at : 1
MENU
1. Insert a Frame
2. Delete all the Frames
3. Run the Animation
4. Quit
3
Run the Animation
Frame #0, time = 1 sec
Image file name = Algonquin_1
Frame #1, time = 2 sec
Image file name = Algonqun_3
Frame #2, time = 3 sec
Image file name = Algonquin_2
MENU
1. Insert a Frame
2. Delete all the Frames
3. Run the Animation
4. Quit
2
Delete all the Frames from the Animation
MENU
1. Insert a Frame
2. Delete all the Frames
3. Run the Animation
4. Quit
3
No frames in the animation
2




Reviews
There are no reviews yet.