ASSIGNMENT QUESTION
PURPOSE
The purpose of this assignment is to develop data structures using C language to solve a given problem and demonstrate the implementation of appropriate data structure features with suitable test data and output.
PART I / BAHAGIAN I
REQUIREMENT
Question 1
You are required to write a C program that will input the number of students and reserve the memory space dynamically. You need to store the student’s name, ID and Culmulative Grade Point Average (CGPA) together as one unit. In order to do this, you must use a structure data type.
Next, you must declare ptr as a pointer of struct student * type (that can point to the location of struct student type) as shown below:
struct student *ptr;
Then, use a linked list data structure to store the student information in nodes and link them. You can use the operator - to access the data in the structure through ptr.
Finally, your program should count and display the average cgpa entered for the n students. The linked list must be sorted by students’ name in ascending order before it is displayed to the user. The sample output is shown below:
The assessment will be done based on the following criteria:
i. A proper writing of C codes: structure, efficiency and modular.
ii. The readability, consistency, naming and user interface
iii. Robustness and testing
iv. Complete documentation and correct submission.
Note: You MUST write C programming codes for this assignment. Codes written in C++ will not be accepted.
You are required to submit:
1. Documentation file (*.doc/*.docx) that contains introduction, description of problem, program listing and its comments and print screen of the program output.
2. Source file (*.c)
(50 marks)
ATTACHMENT
ASSIGNMENT RUBRICS
CBDS2103 DATA STRUCTURE/ JAN 2022
*QN CLO Criteria
Weight Excellent Good Fair Poor Unsatisfactory Max Marks
4 3 2 1 0
1 2 Declaration of structure, pointer and linked list structure
Structure, Efficiency and Modular:
• Codes are clear, logical, control structure used correctly.
• Most appropriate programming structures (selection, repetition, files) are used
• Functions are modular and increases programming clarity 2.5 Met the requirements of the criteria.
Mostly met the requirements of the criteria but it can be improved further.
Basic/ minimally met the requirements of the criteria.
Poorly met the requirements of the criteria.
Did not meet criteria at all OR wrong answer was given.
10
1 2 Linked list manipulation: Insert and Traverse List
Structure, Efficiency and Modular:
• Codes are clear, logical, control structure used correctly.
• Most appropriate programming structures (selection, repetition, files) are used
• Functions are modular and increases programming clarity 2.5 Met the requirements of the criteria.
Mostly met the requirements of the criteria but it can be improved further.
Basic/ minimally met the requirements of the criteria.
Poorly met the requirements of the criteria.
Did not meet criteria at all OR wrong answer was given.
10
1 2 Sorting the linked list in ascending order of student name
Structure, Efficiency and Modular:
• Codes are clear, logical, control structure used correctly.
• Most appropriate programming structures (selection, repetition, files) are used
• Functions are modular and increases programming clarity 2.5 Met the requirements of the criteria.
Mostly met the requirements of the criteria but it can be improved further.
Basic/ minimally met the requirements of the criteria.
Poorly met the requirements of the criteria.
Did not meet criteria at all OR wrong answer was given.
10
1 2 Readability, consistency, naming and user interface:
• Coding style, easy to read and maintain.
• Consistent and proper naming.
• Screen based instruction and final output are clear, correct and attractive. 2.5 Met the requirements of the criteria.
Mostly met the requirements of the criteria but it can be improved further. Basic/ minimally met the requirements of the criteria. Poorly met the requirements of the criteria.
Did not meet criteria at all OR wrong answer was given. 10
1 2 Robustness and Testing
• Ability of the program to be compiled and executed
• The program can handle erroneous or unexpected input
• Complete without being redundant, all test cases are considered
• Determination process based on the input. Correct technique must be chosen and shown in this part
• Displaying all output as required 1.25 Met the requirements of the criteria. Mostly met the requirements of the criteria but it can be improved further. Basic/ minimally met the requirements of the criteria. Poorly met the requirements of the criteria. Did not meet criteria at all OR wrong answer was given. 5
1 2 Complete documentation and correct submission:
• Cover page of assignment
• Introduction, description of problem
• Copy of codes
• Several screenshots with various input and output
• Submission of C source file in extension .c 1.25 Met the requirements of the criteria. Mostly met the requirements of the criteria but it can be improved further. Basic/ minimally met the requirements of the criteria. Poorly met the requirements of the criteria. Did not meet criteria at all OR wrong answer was given. 5
Total 12.5 50
*QN = Question Number
GET ANSWERS / LIVE CHAT