C Programming Project
Submission (all dropboxes are in the ‘Assessment’ tab):
1. Submit a video in which you demonstrate your code against the requirements I’ve set below,
as well as demonstrating the output of your code. I will go through an example with you to
give you an idea of what is expected in the video. Submission dropbox is “C Program Video”.
a. You can use any video capture software or you can use Kaltura. Your video
demonstration needs to be in Codeblocks, DevC++ or Xcode (for Mac). If you use
any other IDE you will be penalised.
b. Your video needs to be less than 7 minutes.
c. Check your video before submission, eg for audio.
d. If you don’t submit your video, you will get a zero.
2. Submit your .c file to the submission dropbox entitled. “C Program .c file”. Do not copy your
.c file into any other format. Do not submit .exe files to the dropbox.
3. Submit any text files to “Supplementary material”.
Submissions 2 and 3 are needed just in case I need to double check something or if you’ve
missed something out in the video. Please make sure your code runs and it must run on
Codeblocks or DevC++. If you don’t have Codeblocks/DevC++ on your computer then follow
these instructions to access Codeblocks/DevC++ on the remote desktop to check your code.
If you don’t submit your .c and .txt files then you will be penalised.
Feedback: You will receive feedback via a rubric/marksheet and a mark for your code. Provisional
marks may change as a result of unfair means and/or late submissions.
Assignment briefing: This assignment will assess your ability to solve a problem using C as a
tool. Your program must be well laid out and commented, including a meaningful header comment.
Your program must provide meaningful interactions with the user. You must also use all of the
following C programming elements:
?
selection (if or switch case),
?
repetition (for or/and while or/and do while)
?
at least one input file
?
at least one function with an array of struct in the input parameter list; the function must
set values in the array of struct, and the calling function (main or other) must make use of
the array of struct on return (you choose whether to pass by value or pass by address)
?
at least one function with a pointer to a variable of type char, int, float or double in the
parameter list; the function must set the contents of the variable, and the calling function
(main or other) must make use of the variable on return
?
your program needs several instances where the user must input commands from the
keyboard in order to interact with the program
?
your program must loop to the start allowing the user to run through the program time after
time (this is an independent requirement from the second point to use repetition)
Optional:
o you can create other functions and/or structures so as to modularise your code (but you must
have the 2 functions mentioned above).
o you can use anything else we have covered in this module, eg, arrays/strings, an output file
You need to decide on what problem to solve in your program. Do not
use one of the problems from the ACS130 lectures, labs, previous
assignments or past papers.
The 10-12 Friday sessions (week9, 10, 11): I will be available if you want
to discuss your problem with me. During these sessions I will not be
looking at individual code or helping you with debugging, but I will be
available to answer general questions or clarifying certain concepts with
respect to lecture slides and tutorial questions.
Instructions to the screen need to be clear so that I can successfully understand how
your code runs!
Component
Marks
Comments
Does the program use any global variables? Does the program use while(1)
loop/s?
Yes/no (If yes, 50% penalty)
Program layout and commenting:
?
Meaningful header comment (including a detailed description of code)
?
sufficient comments interspersed within code
?
Good indentation
?
Meaningful variable names
/1
0 mark if any
of these are
missing
Marks available for executing program only:
Is there sufficient interaction between user and program? Yes/No
Interaction with the user
The user needs to be able to interact several times with the program.
?
Is the user given prompts to enter any information that is needed from
the keyboard?
?
Is the information displayed to the user easy to understand, including
any required ranges?
?
Does the program loop to start?
If No, 0 for this
section
/2
Use of a file:
?
Does the program use at least one input file? Yes/no
?
Is information from the file(s) used in the program via the array of
struct?
If No, 0 for
this section
/1
Use of selection:
?
Does the program use an if or switch case correctly?
If No, 0 for this
section
/1
Use of repetition:
?
Does the program use for, while, or do while correctly?
If No, 0 for this
section
/1
Use of function(s), with array of struct in parameter list:
Does the program use at least one function with an array of struct included
in the parameter list? Eg struct Books B[3] Yes/no
If No, 0 for
this section.
?
Declaring the array of struct in main or other calling function (not in
the called function).
?
Setting some values within the array of struct from inside the function.
?
Using (on return from the function) values in the array of struct in main
or other calling function.
-> notation as an alternative to dereference and dot notation is allowed.
/2
Use of function(s), with pointer variable in parameter list:
Does the program use at least one function with a pointer to a variable (not
an array) of type char, int, float, double, struct (not the same as previous
function) in the parameter list? Yes/no
?
Declaring the variable in main/calling function (not in the called fn)
?
Setting the contents of the variable from inside the function.
?
Using (on return from the function) the variable in main or other calling
function.
If No, 0 for
this section.
/2
Does the program work with a variety of disparate inputs, without
malfunctioning? (i.e. is code debugged and tested thoroughly)
Please test the following:
?
Inputting out of range numbers (including boundary values, massively
too small/large, zero, negative/positive) at every instance
?
Temporarily removing input file or change name of file in code. Program
must end if file not found.
In each case, the program should allow re-input, or a message should be
given to alert the user to problems such as missing files.
If No, then 0
for this
section.
/1
Complexity of code*
/10
Efficiency of code**
/4
Is IDE Codeblocks, DevC++ or Xcode? If not, -5 marks.
Are .c and .txt submissions available in correct submission
dropboxes? If not, -5 marks.
Total mark
/25
*Complexity of code: Out of 10 marks. I will judge this as I am marking your code
0 marks: Your code is very simple/basic and mainly consists of scanf and printf statements.
3 marks: Basic algorithms/control sequences: Eg some basic +, -,*,/ (eg converting Fahrenheit
to Celcuis), multiple choice quiz, least common multiple, greatest common divisor, calculating
number of combinations and permutations
6 marks: Medium complexity algorithms/control sequences: Eg shortest path from source to
destination in a 2D maze , root to leaf path for a variable tree (please note that the example shown
is for a static tree), extensive analysis of 2nd order systems (inc TF, pole-zero, variable gain and
plots)
10 marks: Complex algorithms/control sequences: Eg complex simulated games with a few rules
(eg Pacman, battleships, game of life or make one up!)
**Efficiency of code: Out of 4 marks
This is looking at things like: using loops, arrays, modularity- adding other functions to the code other
than the ones mentioned in the briefing. Is the code compact?
Penalties for late submission: 5% reduction in the mark for every day or part thereof that the assignment is
late, and a mark of zero for submission more than five days late. For more information see
http://www.shef.ac.uk/ssid/exams/policies.
How you should work: This is an individual assignment, and it must be wholly your own work. You must
not copy algorithms or code for this assignment from any other source. You must not show anyone else any
part of your code (small or large), nor must you look at any part of anyone else’s code, because if you do this
is likely to result in similarity in your algorithms and code.
Unfair means: Any suspicions of the use of unfair means, alerted to the module leader either by the marker
Extenuating circumstances: If you have medical or personal circumstances which cause you to be unable
to submit this assignment on time, please complete an extenuating circumstances form and submit it to acse-
support@sheffield.ac.uk.
Help: This assignment briefing, the lectures and labs and the C online resources on your ACS130 reading
list provide all the information that is required to complete this assignment. You need to decide on the
algorithm to solve this problem, subject to the instructions in the assignment briefing. You also need to create
and debug the C code to solve this problem. However if you need clarifications on the assignment then please
post a question on the ACS130 Blackboard discussion board. I will not reply to assignment related
emails unless the query is of a personal nature. The discussion board is an opportunity for everyone
to see the Q&A so that no one is disadvantaged.