DEPARTMENT OF ELECTRONIC & COMPUTER ENGINEERING


Pro-forma to accompany assignment /coursework2020/2021

This pro-forma should be the first page to any set assignment / coursework. A full assignment brief should accompany this pro-forma.


Module Code: EE 1612

Module Leadey: XU ZHANG

Assessor: XU ZHANG

Module Title: C Programming

Assessment Title: C Programming Assignment

Weighting:20%


Main objectives of the assessment:

To introduce the students the key issues of C programming, including array, struct and loop, etc.
Learn to design a student management system.
Learn to write a report.


Brief Description of the assessment:

Finish a student transcript management project with multi-function.


Learning outcomes for the assessment:

Demonstrate knowledge and understanding (K) cognitive (thinking) skills (C) and other skills an attributes (S)

(K) Knowledge and Understanding Write practical C programs demonstrating knowledge of different data types, functions, flow control, standard input and output library functions, array, pointer and structure; Design and implement multi-function C program.

(C) Cognitive (thinking) Skills Understand the question and implement.

Find and correct errors in the process of writing code and reading existed code.

(S) Other Skills and Attributes Design, compile and debug programs using an integrated development environment.


Assessment and marking criteria

Report(25%)

Source code(25%)

Screen shot(25%)

Flowchart(25%)


Assessment method by which a student can demonstrate learning outcomes:

Problem 1-6 has individual points. Each problem will be assessed with key statement and output.

Write a report, include all source code and output screenshot.


Format for the assessment/coursework (Guidelines on the expected format and length of submission):

Submission is completed via wiseflow system.

The assignment should be submitted in a .doc/.docx or pdf file, all the source code should be included and output screenshot should be included.


Distribution date to students: 12:00, SAT, 19th Dec. 2020

Submission Deadline: 12:00, TUE, 3rd, Jan.


Indicative Reading List:

Text Book / Standard Library of C


Further information: N/A



C Programming Language

Contribution to module (weighting: 20 %)

1st Semester 2020-2021


Out: SAT. 19th Dec. 2020

Due: SUN. 3rd Jan. 2021


Main objective of the assignment:

Understand C programming and practice to draw a flow chart to describe the problem and coding in C.


You are given a struct student, Table-1 and Table-2 as listed below.

You are required to finish the assignment with given information.
- Write a report;
- Use a flow chart or another method, demonstrate the data flow;
- Explain how the structure/functions to be used;
- Program in C language;
- Output screenshot for each question;


1. You are required to finish struct student class[] = {} using Table-

1.
struct student
{
int stuno;
char fullname[20]
int age;
struct transcript;
};


Table-1. Students’ Record (Given as a file “stu.txt”)

*You are requested to modify the last record with your name, keep stuno and age.


2. Sort the records based on student age. You are required to write an appropriate callback function, and output without transcript information on screen.

3. Transcript can be accessed from Table-2. First, you need to sort student’s records based on their scores. Then, write an appropriate callback function, and output with transcript information on screen.


Table-2. Transcript Information (Given as a file “records.txt”)


4. Calculate the average score of “C Programming” using recursive function. Write the appropriate callback function, and output the average score (AVG) on screen.
5. Output all “C Programming” scores with student information, write the result to a new txt file and name the file with your Brunel id. To achieve this, you need to use strcmp() function to select “C Programming” course. You are required to add a new column as remark(Ordinary Degree(Pass) / Lower-second Class Degree / First Honors Degree). Switch or if statement must be used to get remark information. Specifically,
40-44 indicate “Ordinary Degree(Pass)”;
45-49 indicate “Third Class Degree”;
50-59 indicate “Lower-second Class Degree”;
60-69 indicate “Upper-second Class Degree”
70-100 indicate “First Honors Degree”.


An example is given below:


6. Write a flow chart for each function.


Remarks:

* Solutions to all questions above need to be included one *.c file. In addition, you are required to define a function for each question. e.g.: main(), Q1functionname(), Q2functionname(), Q3functionname(), Q4functionname() and Q5functionname(). Qxfunctionname() should be given by yourself.
* The output for each question should be done in main() function.
* Do not include any Chinese characters in your assignment.
* You are required to write annotation before each function, and annotation/description for important statements. e.g.:
/∗
@function function_name
@desc describe what is this function used for.
∗/
* The assignment should be submitted in a .doc/.docx or pdf file, all the source code should b included, and output screenshot should be included.