0% found this document useful (0 votes)
57 views11 pages

Cbds 2103

The document provides instructions for an assignment on data structures in C language. It consists of two parts - Part I requires students to write a C program to store student information such as name, ID, and GPA in a linked list, calculate the average GPA, and sort the list by name. Part II requires students to participate in an online discussion group about uses of data structures. Students must submit documentation of their program code and screenshots of their online discussion posts as proof of participation. The assignment is worth a total of 60 marks and tests students' ability to implement data structures in C programming.

Uploaded by

Ain Amirah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views11 pages

Cbds 2103

The document provides instructions for an assignment on data structures in C language. It consists of two parts - Part I requires students to write a C program to store student information such as name, ID, and GPA in a linked list, calculate the average GPA, and sort the list by name. Part II requires students to participate in an online discussion group about uses of data structures. Students must submit documentation of their program code and screenshots of their online discussion posts as proof of participation. The assignment is worth a total of 60 marks and tests students' ability to implement data structures in C programming.

Uploaded by

Ain Amirah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

ASSIGNMENT/ TUGASAN

_________________________________________________________________________
CBDS2103
DATA STRUCTURES
STRUKTUR DATA
JANUARY 2022

SPECIFIC INSTRUCTION / ARAHAN KHUSUS

1. Answer in ENGLISH or MALAY.


Jawab dalam BAHASA INGGERIS atau BAHASA MELAYU.

2. Submit your assignment ONCE only in MULTIPLE files.


Hantar tugasan SEKALI sahaja dalam PELBAGAI fail.

3. The program must be written in C LANGUAGE.


Aturcara mesti ditulis dalam BAHASA C.

4. Submit your assignment ONLINE.


Tugasan ini dihantar secara ONLINE.

5. Submission date : 14 MARCH 2022.


Tarikh penghantaran : 14 MAC 2022.

6. This assignment accounts for 60% of the total marks for the course.
Tugasan ini menyumbang sebanyak 60% dari jumlah markah kursus.
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.

Tujuan tugasan ini adalah untuk membangunkan struktur data menggunakan bahasa C
untuk menyelesaikan masalah tertentu dan menunjukkan pelaksanaan ciri struktur data
yang sesuai dengan data dan output ujian yang sesuai.

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)
Soalan 1
Anda dikehendaki menulis aturcara C yang akan input bilangan pelajar dan akan merizab
ruang memori secara dinamik. Anda perlu menyimpan nama, ID dan Purata Nilai Gred
Kumulatif (CGPA)pelajar sebagai satu unit. Bagi tujuan ini, anda perlu menggunakan jenis
data struktur.

Selepas itu, anda perlu mengisytihar ptr sebagai penunding bagi struct student * type
(yang akan menunding kepada lokasi struct student type) seperti yang ditunjukkan di
bawah:
struct student *ptr;

Kemudian, gunakan struktur senarai terpaut untuk menyimpan maklumat pelajar dalam nod
dan pautannya. Anda boleh menggunakan operator -> untuk mengekses struktur menerusi
ptr.

Akhir sekali, aturcara anda perlu mengira dan memaparkan purata cgpa yang dimasukkan
bagi n bilangan pelajar. Senarai terpaut tersebut mestilah terisih mengikuti nama pelajar
dalam turutan menaik sebelum ianya dipaparkan kepada pengguna. Contoh output
ditunjukkan seperti di bawah:
Penilaian akan dilakukan berdasarkan kepada kriteria berikut:
i. Penulisan kod C yang betul: struktur, kecekapan dan modular
ii. Kebolehbacaan, ketekalan, penamaan dan antara muka pengguna
iii. Kekukuhan dan ujian
iv. Dokumentasi lengkap dan penghantaran yang betul.

Nota: Anda MESTI menulis kod pengaturcaraan C bagi tugasan ini. Kod yang ditulis dalam C+
+ tidak akan diterima.

Anda dikehendaki untuk menghantar:


1. Fail dokumentasi (*.doc/*.docx) yang mempunyai pengenalan, penghuraian masalah,
aturcara serta komennya dan imbasan output bagi aturcara.
2. Fail sumber (*.c)
(50 markah)
PART II / BAHAGIAN II

Instructions:
 Join a discussion group in the forum and discuss the topic given below.
 There will be a platform for group discussions readily available for you in the forum
in myINSPIRE.
 You may select any group to work with.
 Follow the instructions for submitting proof of online class participation.

Arahan:
 Sertai kumpulan perbincangan dalam forum dan bincangkan topik yang diberikan di
bawah.
 Terdapat platform untuk perbincangan kumpulan yang tersedia untuk anda di dalam
forum di myINSPIRE.
 Anda boleh memilih mana-mana kumpulan untuk bekerjasama.
 Ikut arahan untuk menyerahkan bukti penyertaan kelas dalam talian.

Question 2
As a group select and discuss one of the following:
a. Share and discuss in general the use data structures such as arrays, structures,
linked lists, stack and queues in our day to day lives.
b. Share and discuss how you would apply these data structures in your work place.

(10 marks)
[Total: 60 Marks]
Soalan 2
Sebagai satu kumpulan pilih dan bincangkan salah satu daripada yang berikut:
a. Kongsi dan bincangkan secara umum penggunaan struktur data seperti tatasusunan,
struktur, senarai terpaut, timbunan dan baris gilir dalam kehidupan seharian kita.
b. Kongsi dan bincangkan cara anda menggunakan struktur data ini di tempat kerja
anda.
(10 markah)
[Jumlah: 60 Markah]
INSTRUCTIONS ON HOW TO SUBMIT PROOF OF ONLINE CLASS PARTICIPATION (10%)

Do the following:

1. Select the best FIVE (5) postings from the forum discussion set up by your tutor.
2. Do screenshots of the postings and include them as images in your assignment.
3. The screenshots should be in image file (either in JPG or PNG format) . Refer to the
sample of Screen Grab below
4. The screenshots should contain: Name, Title of the discussion, Day, Date and Time.

ARAHAN BAGI TATACARA PENGHANTARAN SEBAGAI BUKTI AKTIVITI ONLINE CLASS


PARTCIPATION (10%)

Laksanakan perkara berikut:

1. Pilih LIMA (5) postings terbaik dari perbincangan dalam talian yang telah di sediakan oleh
tutor anda
2. Laksanakan screen shot posting dan isikan dalam tugasan anda sebagai file imej
3. Imej screen shot mesti dalam format imej (sama ada JPG atau PNG). Rujuk pada contoh
screenshot di bawah.
4. Screen shot mesti mengandungi: Nama, Tajuk Perbincangan, Hari, Tarikh dan Masa

END OF PAGE / MUKA SURAT TAMAT


ATTACHMENT
ASSIGNMENT RUBRICS
CBDS2103 DATA STRUCTURE/ JAN 2022
Excellent/ Good/ Fair/ Poor/ Unsatisfactory/
*QN/ Criteria/ Weight/ Cemerlang Baik Sederhana Lemah Tidak memuaskan Max
CLO
*NS Kriteria Pemberat Marks
4 3 2 1 0
Declaration of structure, pointer and linked list Met the Mostly met the Basic/ minimally Poorly met the Did not meet
structure requirements of requirements of met the requirements of criteria at all OR
Structure, Efficiency and Modular: the criteria. the criteria but it requirements of the criteria. wrong answer was
 Codes are clear, logical, control structure used can be improved the criteria. given.
correctly. further.
 Most appropriate programming structures
(selection, repetition, files) are used
 Functions are modular and increases programming
clarity
1 2 2.5 10
Pengisytiharan struktur, penuding dan struktur senarai Memenuhi Memenuhi Memenuhi Memenuhi Tidak memenuhi
terpaut keperluan kriteria. kebanyakan keperluan kriteria keperluan kriteria kriteria langsung
Struktur, Kecekapan dan Modular: daripada keperluan secara asas/ secara lemah. ATAU jawapan
 Kod jelas, logic, struktur kawalan yang digunakan kriteria tetapi ianya minimal. yang salah telah
dengan betul. boleh dimantapkan diberikan.
 Struktur pengaturcaraan yang paling sesuai lagi.
(pemilihan, pengulangan, fail) digunakan.
 Fungsi bersifat modular dan meningkatkan
kejelasan pengaturcaraan
1 2 Linked list manipulation: Insert and Traverse List 2.5 Met the Mostly met the Basic/ minimally Poorly met the Did not meet 10
Structure, Efficiency and Modular: requirements of requirements of met the requirements of criteria at all OR
 Codes are clear, logical, control structure used the criteria. the criteria but it requirements of the criteria. wrong answer was
correctly. can be improved the criteria. given.
 Most appropriate programming structures further.
(selection, repetition, files) are used
 Functions are modular and increases programming
clarity
Manipulasi senarai terpaut: selitan dan penyusuran Memenuhi Memenuhi Memenuhi Memenuhi Tidak memenuhi
senarai keperluan kriteria. kebanyakan keperluan kriteria keperluan kriteria kriteria langsung
Struktur, Kecekapan dan Modular: daripada keperluan secara asas/ secara lemah. ATAU jawapan
 Kod jelas, logic, struktur kawalan yang digunakan kriteria tetapi ianya minimal. yang salah telah
boleh dimantapkan
dengan betul. lagi. diberikan.
 Struktur pengaturcaraan yang paling sesuai
(pemilihan, pengulangan, fail) digunakan.
 Fungsi bersifat modular dan meningkatkan
kejelasan pengaturcaraan
Sorting the linked list in ascending order of student Met the Mostly met the Basic/ minimally Poorly met the Did not meet
name requirements of requirements of met the requirements of criteria at all OR
Structure, Efficiency and Modular: the criteria. the criteria but it requirements of the criteria. wrong answer was
 Codes are clear, logical, control structure used can be improved the criteria. given.
correctly. further.
 Most appropriate programming structures
(selection, repetition, files) are used
 Functions are modular and increases programming
clarity
1 2 2.5 10
Isihan senarai terpaut dalam turutan menaik Memenuhi Memenuhi Memenuhi Memenuhi Tidak memenuhi
mengikuti nama pelajar keperluan kriteria. kebanyakan keperluan kriteria keperluan kriteria kriteria langsung
Struktur, Kecekapan dan Modular: daripada keperluan secara asas/ secara lemah. ATAU jawapan
 Kod jelas, logic, struktur kawalan yang digunakan kriteria tetapi ianya minimal. yang salah telah
dengan betul. boleh dimantapkan diberikan.
 Struktur pengaturcaraan yang paling sesuai lagi.
(pemilihan, pengulangan, fail) digunakan.
 Fungsi bersifat modular dan meningkatkan
kejelasan pengaturcaraan
Readability, consistency, naming and user interface: Met the Mostly met the Basic/ minimally Poorly met the Did not meet
 Coding style, easy to read and maintain. requirements of requirements of met the requirements of criteria at all OR
 Consistent and proper naming. the criteria. the criteria but it requirements of the criteria. wrong answer was
 Screen based instruction and final output are can be improved the criteria. given.
clear, correct and attractive. further.
Kebolehbacaan, ketekalan, penamaan dan antara Memenuhi Memenuhi Memenuhi Memenuhi Tidak memenuhi
1 2 2.5 10
muka pengguna: keperluan kriteria. kebanyakan keperluan kriteria keperluan kriteria kriteria langsung
 Gaya pengekodan, mudah dibaca dan daripada keperluan secara asas/ secara lemah. ATAU jawapan
diselenggara. kriteria tetapi ianya minimal yang salah telah
 Penamaan yang konsisten dan tepat boleh dimantapkan diberikan.
 Arahan berdasarkan skrin dan output akhir yang lagi.
jelas, betul dan menarik
1 2 Robustness and Testing 1.25 Met the Mostly met the Basic/ minimally Poorly met the Did not meet 5
 Ability of the program to be compiled and requirements of requirements of met the requirements of criteria at all OR
executed the criteria. the criteria but it requirements of the criteria. wrong answer was
 The program can handle erroneous or can be improved the criteria. given.
unexpected input further.
 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
Kekukuhan dan Ujian: Memenuhi Memenuhi Memenuhi Memenuhi Tidak memenuhi
 Keupayaan aturcara untuk dikompil dan keperluan kriteria. kebanyakan keperluan kriteria keperluan kriteria kriteria langsung
dilaksanakan daripada keperluan secara asas/ secara lemah. ATAU jawapan
 Aturcara ini dapat menangani input yang salah kriteria tetapi ianya minimal. yang salah telah
atau tidak dijangka boleh dimantapkan diberikan.
 Lengkap tanpa kelebihan, semua kes ujian lagi.
dipertimbangkan
 Proses penentuan berdasarkan input. Teknik yang
betul mesti dipilih dan ditunjukkan di bahagian ini
 Menunjukkan semua output mengikut keperluan
Complete documentation and correct submission: Met the Mostly met the Basic/ minimally Poorly met the Did not meet
 Cover page of assignment requirements of requirements of met the requirements of criteria at all OR
 Introduction, description of problem the criteria. the criteria but it requirements of the criteria. wrong answer was
 Copy of codes can be improved the criteria. given.
 Several screenshots with various input and further.
output
 Submission of C source file in extension .c
1 2 1.25 5
Dokumentasi lengkap dan penghantaran yang betul: Memenuhi Memenuhi Memenuhi Memenuhi Tidak memenuhi
 Muka hadapan tugasan keperluan kriteria. kebanyakan keperluan kriteria keperluan kriteria kriteria langsung
 Pengenalan, penghuraian masalah daripada keperluan secara asas/ secara lemah. ATAU jawapan
 Salinan kod kriteria tetapi ianya minimal. yang salah telah
 Beberapa cekupan skrin dengan pelbagai input boleh dimantapkan diberikan.
dan output lagi.
 Penghantaran fail sumber C dalam sambungan .c
2 3 Quality of Postings 2.5 All five comments Four of the Three of the None of the No postings given 10
are good, comments are comments are comments are as proof of
appropriate, good, appropriate, somewhat good, good and participation in
relevant, relevant, appropriate, relevant. / discussion
meaningful, and meaningful,and meaningful,and Comments are
respectful respectful respectful short responses
that are not
substantial nor
meaningful.
Minimum effort
(e.g. “I agree with
Tina”)
Kualiti Kelima-lima komen Empat Tiga komen baik, Tiada komen yang Tiada Postings
Postings baik, sesuai, komen baik, sesuai, sesuai, baik dan relevan./ diberi sebagai bukti
relevan, bermakna relevan, bermakna relevan,bermakna Komen hanya penyertaan dalam
dan berhemah dan berhemah dan berhemah respon yang perbincangan
ringkas dan tidak
meluas dan tidak
bermakna.Usaha
minimum (Cth:
“Saya bersetuju
dengan Tina”)
Total 15 60
*QN = Question Number / *NS = Nombor Soalan

You might also like