Data Structure Assignment
Data Structure Assignment
KURSUS /COURSE TITLE : DATA STRUCTURE SEMESTER /SEMESTER : MAY 2013 _________________________________________________________________________ ARAHAN KEPADA PELAJAR / INSTRUCTIONS TO STUDENTS
1. Tugasan ini mengandungi DUA (2) soalan sahaja yang disediakan dalam bahasa modul bercetak kursus ini. / This assignment contains only TWO (2) question that is set in the language of the printed module for the course. 2. Jawab dalam Bahasa Melayu atau Bahasa Inggeris. / Answer in Malay or English. 3. Muat turunkan templat tugasan versi bahasa yang berkenaan daripada MyVLE untuk penyediaan dan penyerahan tugasan anda . Tugasan anda hendaklah ditaip dengan menggunakan Times New Roman fon saiz 12 dan langkau 1.5. baris/ Download the language version of the assignment template concerned from the MyVLE for preparation and submission of your assignment. Your assignment should be typed using 12 point Times New Roman font and 1.5 line spacing. 4. Tugasan anda hendaklah antara 2500 hingga 3000 patah perkataan tidak termasuk rujukan. Bilangan perkataan hendaklah ditunjukkan di hujung tugasan anda. Jangan salin soalan dan arahan tugasan dalam jawapan anda . / Your assignment should be between 2500 to 3000 words excluding references. The number of words should be shown at the end of your assignment. Do not copy the assignment question and instructions to your answer. 5. Anda dikehendaki menghantar tugasan SECARA ONLINE melalui MyVLE. Sila rujuk kepada portal untuk arahan mengenai prosedur menghantar tugasan anda secara on-line. Anda dinasihatkan menyimpan senaskah tugasan yang diserahkan untuk rujukan sendiri. / You must submit your assignment ONLINE via the MyVLE. Refer to the portal for instructions on the procedures to submit your assignment on-line. You are advised to keep a copy of your submitted assignment for personal reference. 6. Anda hanya boleh menghantar tugasan SEKALI sahaja dalam SATU fail. / You can submit your assignment ONCE only in a SINGLE file. 7. Tugasan anda hendaklah diserahkan pada 9hb Julai hingga 17hb Julai 2013. Serahan selepas 17hb Julai 2013 TIDAK akan diterima. / Your assignment must be submitted between 9nd July to 17th July 2013. Submission after 17th July 2013 will NOT be accepted. 8. Tugasan hendaklah disiapkan secara individu. Anda dilarang meniru tugasan orang lain. Anda juga dilarang sama sekali memplagiat kerja orang lain sebagai kerja sendiri. /
Your assignment should be prepared individually. You should not copy another persons assignment. You should also not plagiarise another persons work as your own.
PENILAIAN / EVALUATION Tugasan ini menyumbang sehingga 60% daripada jumlah markah kursus berkenaan dan akan dinilai berdasarkan kepada Rubrik yang dilampirkan. / This assignment accounts for 60% of the total marks for the course and shall be assessed based on the Rubrics attached . Anda akan diberikan maklum balas tentang tugasan ini sebelum Peperiksaan Akhir Semester bermula / You would be given feedback on the assignment before the Final Semester Examination commences. PLAGIARISME: POTONGAN MARKAH / PLAGIARISM: MARKS DEDUCTION Amaran: Tugasan yang diserahkan, secara automatik, akan disemak untuk menentukan kadar pertindihan. Jika plagiarisme dikesan, markah akan dipotong seperti berikut: / Warning: The submitted assignment will automatically undergo a similarity check. If plagiarism is detected, marks would be deducted as follows: Tugasan dengan pertindihan kandungan antara 10 - 30%: potongan 20% daripada jumlah markah yang diperoleh. Tugasan dengan pertindihan kandungan antara 31 - 50%: potongan 40% daripada jumlah markah yang diperoleh. Tugasan dengan pertindihan kandungan lebih daripada 50%: Markah sifar akan diberikan. Assignments with 10 - 30 % overlap with others: 20% deduction from the total marks scored. Assignments with 31 - 50 % overlap with others: 40% deduction from the total marks scored. Assignments with more than 50% overlap with others: Zero mark would be given.
QUESTION 1 Write a C program that uses two-dimensional array to calculate i. ii. iii. iv. v. vi. Average sales for each staff Average sales for each quarter Average sales for a year Total sales for each staff Total sales for each quarter Total sales for a year
The sales performance is given in Table 1. Staff ID Quarter Table 1. Quarter Quarter Quarter
(20 marks) QUESTION 2 Consider the problem of recognizing whether a particular string is in the language: L = { w$w: w is a possibly empty string of characters other than $, w = reverse(w) }. Write a C program to determining whether a given string is in L. You must apply stacks to solve this question. Output Sample 1: Input a string: ABC$CBA Result: The above string is in the language Output Sample 2: Input a string: ABCD$CB Result: The above string is not in the language
(40 marks)
END OF PAGE
0.25
Wrong coding
Documentation 0.25
Wrong coding
No documentation
Brief documentationcomments given only in few lines Execution that produced mostly incorrect output OR produce the correct output but the coding were done by not fulfilling few of the questions requirement A logical solution that is easy to follow but it is not the most efficient. -
Good documentationcomments given in most of the lines Execution that produced mostly correct output
Excellent documentation comments given in all the lines Execution that produced all the outputs which are correct AND The program fulfills all the requirements as stated in the question
Runtime
Wrong coding
Does not execute due to errors. OR produce the correct output but the coding were done by not fulfilling all or most the questions requirement
1.0
Efficiency 0.5
Wrong coding
TOTAL
5.0
20
QUESTION 2
Weight Poor 0 1 Program Completion Coding Standards 0.5 6 Wrong coding Performed at least one requirement on assignment sheet. Codes looks messy 2 Performed at least half of all requirements on assignment sheet. There is still a room for improvement 3 Performed most requirements on assignment sheet. Organised work. 4 Performs all requirements on assignment sheet with no errors. Creatively organised work. Weak Satisfactory Good Excellent Total marks (max) 24
Wrong coding
Documentation 0.5
Wrong coding
No documentation
Brief documentationcomments given only in few lines Execution that produced mostly incorrect output OR produce the correct output but the coding were done by not fulfilling few of the questions requirement
Good documentationcomments given in most of the lines Execution that produced mostly correct output
Excellent documentation comments given in all the lines Execution that produced all the outputs which are correct AND The program fulfills all the requirements as stated in the question
Runtime
Wrong coding
Does not execute due to errors. OR produce the correct output but the coding were done by not fulfilling all or most the questions requirement
Efficiency
Wrong coding
A logical solution that is easy to follow but it is not the most efficient. -
TOTAL
10
40