C Programming Language
Contribution tomodule (weighting: 20 %)
1st Semester 2018-2019
Out: WED. 5th Dec. 2018 Due: 18:00[GMT], WED. 19th Dec. 2018
Main objective of the assignment:
Understand C programming and practice to draw aflow chart to describe
the problem andcoding in C.
You aregiven a struct student,Table-1and Table-2 as listed below. You are
required to finish the assignment with given information.
- Use aflow chart or another method, demonstrate the data flow;
- Explain how the structure/functions to be used;
- Program in C language;
- Output screenshot foreach question;
1. You are required to finish struct student class[] = {} using Table-1.
struct student
{ int stuno; char fname[20]
char lname[20]
int age;
struct transcript;
};
Table-1. Students’ Record
stuno fname lname age
101 Keanu Reeves 21
102 Nicolas Cage 20
103 Tom Cruse 20
104 Susan Boyle 22
105 Mariah Carey 19
2. Sort the records based onstudentage. You are requiredto write an
appropriate callback function, and output without transcript
information.
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.
Table-2. Transcript Information
stuno cname score
101 C Programming 41
101 English 48
102 Math 50
103 Art 43
103 C Programming 56
104 Math 64
105 C Programming 71
105 Math 63
105 Database 32
4. Calculate the average score of “C Programming” using recursive
function. Writethe appropriatecallback function, and output the
averagescore (AVG).
5. Output all “C Programming” scores with student information. To
achievethis, you need to use strcmp() functionto select “C
Programming” course. You are required to add anew column as
remark(OrdinaryDegree(Pass) / Lower-second Class Degree / First
HonorsDegree). Switch or if statement must be used to get remark
information. Specifically,
40-44 indicate “Ordinary Degree(Pass)”;
45-49 indicate “ThirdClass Degree”;
50-59 indicate “Lower-second Class Degree”;
60-69 indicate “Upper-second Class Degree”
70-100 indicate“FirstHonors Degree”.
An example is given below:
Stuno cname score remark
101 C Programming 41
Ordinary
Degree(Pass)
101 English 48
ThirdClass
Degree
… … … …
Remarks:
* Solutions to all questions above needto be included one *.cfile. In
addition, you are required to define a functionfor 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.
/
* List all the source code in the assignment.
* The assignment shouldbe submitted ina .doc/.docx file, all the source
code should be included, and output screenshot should be included.
DEPARTMENTOF ELECTRONIC &COMPUTER ENGINEERING
Pro-forma to accompany assignment / coursework 2018/2019
This pro-forma should be the first pageto any set assignment/coursework.A full
assignment brief shouldaccompany this pro-forma.
Module Code: A1040040 Module
Leader: XU ZHANG Assessor: XU ZHANG
Module Title: CProgramming
Assessment Title: C ProgrammingAssignment Weighting: 20%
Main objectivesof the assessment:
To introduce the students the key issues of C programming, including array,struct and
loop, etc.
Brief Description of the assessment:
Finish a student transcript management project with multi-function.
1. Sorting withscore or age.
2. Implement with recursive function tocalculate average score.
Learning outcomes for the assessment:
Demonstrate knowledge and understanding
(K) cognitive (thinking) skills(C) andother
skills and attributes (S)
(K) Knowledge and Understanding
Write practicalC programs demonstrating
knowledge of different data types,
functions, flowcontrol, standard inputand
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 errorsin the process of
writing code and reading existed code.
(S) Other Skills and Attributes
Assessment and marking criteria
- Use a flow chart or another method,
demonstrate the data flow – 25%
- Explain how the structure/functions to be
used - 25%
- Program in C language – 25%
- Output screenshot for each question – 25%
Design, compile anddebug programs using
an integrated development environment.
Assessment method by which a student can demonstrate learning outcomes:
Written assignment (documentation of software) and submitted compressed programming codes
for software
Format for the assessment/coursework (Guidelines on theexpected formatandlength
of submission):
Submission is completed via Blackboard Learn (BBL) only.
Assignment submission includes:
1. Compressed file of software
2. Documentation on implemented software (flow chat) in the form of .pdf or .doc file.
The report should NOT be included into the compressed folder.
Distribution date to students: WED, 5th Dec. 2018
Submission Deadline: 18:00[GMT], WED, 19th, Dec. 2018
Indicative Reading List:
Text Book/Standard Library of C
Furtherinformation: N/A
版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。