XJTLU Entrepreneur Co lege (Taicang) Cover She t
QQ1703105484
Module code and Title | DTS102TC Programming with C++/R | |
School Title | School of Artificial Intelligence and Advanced Computing | |
Assignment Title | Coursework Resit (CW R) | |
Submission Deadline | 5 pm China time (UTC+8 Beijing) on Fri. 5th. Aug. 2022 | |
Final Word Count | NA | |
If you agree to let the university use your work anonymously for teaching and learning purposes, please type “yes” here. |
I certify that I have read and understood the University’s Policy for dealing with Plagiarism, Collusion and the Fabrication of Data (available on Learning Mall Online). With reference to this policy I certify that:
- My work does not contain any instances of plagiarism and/or collusion. My work does not contain any fabricated data.
By uploading my assignment onto Learning Mall Online, I formally declare that all of the above information is true to the best of my knowledge and belief.
Scoring – For Tutor Use | |
Student ID |
Stage of Marking | Marker Code | Learning Outcomes Achieved (F/P/M/D) (please modify as appropriate) | Final Score | ||
A | B | C | |||
1st Marker – red pen | |||||
Moderation – green pen | IM Initials | The original mark has been accepted by the moderator (please circle as appropriate): | Y / N | ||
Data entry and score calculation have been checked by another tutor (please circle): | Y |
2nd Marker if needed – green pen | ||||||
For Academic Office Use | Possible Academic Infringement (please tick as appropriate) | |||||
Date Received | Days late | Late Penalty |
| Total Academic Infringement Penalty (A,B, C, D, E, Please modify where necessary) | ||
| ||||||
| ||||||
| ||||||
|
Students
(Please modify where necessary)
The assignment must be typed in an MS Word and converted to a PDF document. The document must be submitted via Learning Mall Online to the correct drop box. Only electronic submission is accepted and no hard copy submission.
All students must download their file and check that it is viewable after submission. Documents may become corrupted during the uploading process (e.g. due to slow internet connections). However, students themselves are responsible for submitting a functional and correct file for assessments.
Submission
You must submit the following files:
- Cover letter with the student ID.
- ID.zip file includes your program implementation.
- A pdf file contains all the program design, source code, program test, and analysis.
DTS102TC Programming with C++/R Coursework Resit (Individual Assessment)
Due: 5:00 pm China time (UTC+8 Beijing) on Friday 5th. Aug. 2022 Weight: 100%
Maximum score: 100 marks (100 individual marks)
Assessed learning outcomes:
- Demonstrate knowledge and understanding of basic principles of C++ programming language.
- Demonstrate knowledge and understanding of basic software development process.
- Develop software development skills covering program design, coding, testing, debugging and executing.
- Demonstrate understanding of the principles of object oriented programming.
- Demonstrate knowledge and understanding of basic principles of R programming language.
Question 1 (20 Marks) Overview
The purpose of this question is to gain experience in R programming. You are expected to write a R program to read data from 'class.csv' file and calculate using R functions.
Tasks
- Read data from the 'class.csv' file. (2 marks)
- Calculate the average height. (4 Marks)
- Calculate the maximum value of body mass index (BMI). The BMI is a person’ s weight in kilograms divided by the square of height in meters. (6 marks)
- Count the number of students whose weight is less than 100. (6 Marks)
- Output the results of task 2, 3, and 4. (2 marks)
Question 2 (80 Marks) Overview
The purpose of this task is to gain experience in C++ programming, including program design, implementation, and testing. You are expected to write a C++ program to input a 9x9 matrix on program console and to implement the game of Sudoku.
Tasks
The game of Sudoku allows the user to enter a 9x9 matrix through the interface, where 0 represents the Null value and the other values are a number from 1 to 9. The program calculates the numbers of all the remaining spaces based on the known numbers on the 9x9 plate, where each row (As shown in the green box), column (As shown in the blue box) and number within each small 3x3 (As shown in the red box) board contains 1-9.
- Program Design (30 marks)
Read the requirement of the question carefully, design the data structure and algorithm of this program.
- You should use UML tools for data structure design. The data structure design covers
- the input storage structure. (5 points)
- the intermediate state storage structure. (5 marks).
- You should use flowcharts tools for algorithm design. The algorithm design covers
- the input method of data matrix. (5 marks)
- the row traversal and checking algorithm. (5 marks).
- the column traversal and checking algorithm. (5 marks)
- the small 3x3 board traversal and checking algorithm. (5 marks).
- Program Implementation (30 marks)
Complete the program implementation using C++ language based on the program design. Use the <sample input> given below in this task to test your program on program console. This task covers:
- implementation of the input method of data matrix. (5 marks)
- implementation of traversal and checking algorithm. (5 marks)
- implementation of column traversal and checking algorithm. (5 marks)
- implementation of 3x3 board traversal and checking algorithm. (5 marks)
- code quality covering naming rules of variables and comments of functions. (5 marks)
- object-oriented program development covering object definition and object encapsulation. (5 marks)
<sample input>
Please enter a 9x9 Integer Sudoku matrix with empty spaces represented by zeros. 000002050
078000300
000004000
500000000
000000100
000030708
200000040
000005090
300000000
<sample output>
The completed 9x9 Sudoku:
1 3 6 | 7 8 2 | 4 5 9 |
4 7 8 | 6 5 9 | 3 1 2 |
9 2 5 | 3 1 4 | 6 8 7 |
5 1 3 | 8 2 7 | 9 6 4 |
7 8 2 | 4 9 6 | 1 3 5 |
6 4 9 | 5 3 1 | 7 2 8 |
2 5 1 | 9 7 3 | 8 4 6 |
8 6 7 | 1 4 5 | 2 9 3 |
3 9 4 | 2 6 8 | 5 7 1 |
- Program Test (10 marks)
Build 1 sample by yourself to test the robustness of the program, to deal with:
- illegal inputs. (5 marks)
- exception handing. (5 marks)
- Program Analysis (10 marks)
Give a detailed analysis of your completed code and test results, consisting of:
- the completeness of functions. (3 marks)
- the complexity of algorithms. (3 marks)
- the rationality of function invoking logic. (4 marks)