Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Assignment 2
General Instructions
Please read the instructions in this document carefully. In this assignment, you will solve FOUR
tasks and a tester would automatically test your submitted program. Sample test cases are provided
with each task in this document (user inputs are printed in blue). However, please note that we
will also use additional test cases when marking your assignment submission.
Total: 100 points
5 points for proper code comments and indentation
5 points for program modularity using appropriate functions
90 points for program correctness
Input and output format
Please follow the instructions given by each question regarding input/output requirements for your
program. If you failed to follow the instructions, the tester may not able to give a score for your
program. Additionally, you should strictly follow the sample output format (including space, line
breaker, etc.), otherwise, your answer might be considered as wrong.
Submission
You are provided with the following 4 C/C++ files, each a code template for a task. Download them
and put them together into one directory. After completing the assignment, compress this directory
as a .zip file. Make sure to only upload the source files (*.c/*.cpp). Do not submit any other files.
There should only be the 4 files in the zip archive. Please use your university number to name the
zip archive and check carefully that the correct files have been submitted. We suggest you
download your submitted files, extract them, and check for correctness. You will receive 0 marks
for this assignment if you submit incorrect files. Resubmission after the deadline is not allowed.
Filename Description
1.cpp Task 1
2.cpp Task 2
3.cpp Task 3
4.cpp Task 4
IMPORTANT: Read the comments in the given code templates carefully, and follow the
instructions there.
Deadline
The deadline is announced in Moodle. Late submission will not be accepted.
Late submission
You will receive 0 marks if you submit after the deadline.
2
Wrong submission
You will receive 0 marks if you submit incorrect files.
Evaluation
Your code will be tested for technical correctness. However, the correctness of your implementation
– not the tester’s judgments – will be the final judge of your score. If necessary, we will review your
work individually to ensure that you receive due credit for your work.
Academic Dishonesty
We will be checking your code against other submissions in the class and from the Internet for
logical redundancy. If you copy someone else’s code and submit it with minor changes, we will
know. We trust you all to submit your own work only; please don’t let us down. If you do, we will
pursue the strongest consequences available to us.