Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

ACS130 Introduction to Systems Engineering and Software

C Programming Project

Tara Baldacchino (t.baldacchino@sheffield.ac.uk, Room D13, AJB)

Assignment weighting: 25% of module mark

Assignment released: Friday 31 March (Semester 2, week 8)

Assignment due: 11.59pm Sunday 7 May (Semester 2, Week 10)

Submission (all dropboxes are in the Assessmenttab):

1.   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.

2.   Submit any text files to “Supplementary material” .

Please make sure your code runs and it must run on Codeblocks or XCode if using a Mac.

Marking and Feedback: You will be required to attend a 1- 1 viva to demonstrate your code. We will download your code from Blackboard to run. You will get oral feedback during this marking session. A day and time will be provided for everyone closer to the time (in weeks 11 and 12). Provisional marks may change as a result of unfair means, moderation from the module leader and/or late submissions. If you dont turn up to the marking session, then your code will not be marked.

You will be given a preliminary mark during the viva session. All code and marks are then reviewed by me and your mark may change.

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 function with an array of struct in the input parameter list;  the array of struct is declared in main (or another function) and this 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

•    defensive programming: guarding against incorrect entries and incorrect types

•    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 input and/or output file (and checking to see if the file exists)

o you can use any pre-defined header files in your code

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 2-3pm sessions in weeks 9&10: I will be available if you want to discuss your problem with me. During this session I will not be looking at individual code or helping you with debugging, but I will be available to answer general questions or clarify 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

Does the program use any global variables? Does the program use while(1) loop/s? Does the program use break (other than in switch case), go to, jump, continue etc

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

-2 marks if any missing

Are function prototypes listed at start of the program? It allows me to check you have satisfied the requirements, as well as efficiency of the code

-2 marks if missing

Only one .c file must be submitted- no user defined .h files (you can submit .txt files in supplementary materials)

-5 marks if code is over several files

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 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

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.

If No, 0 for this section.

/2

Use function(s), pointer parameter :

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