COMP1521 Final Exam - Part 2 of 2

November 2019

Time allowed for this part: 3 hours, answers can not be submitted in 35 minutes

Time allowed for entire exam: 3 hours

Total number of questions this part: 10

Total number of questions entire exam: 27

Total number of marks this part: 100

Total number of marks entire exam: 134

Answer all questions

Commencing Exam

If you are unwell do not commence this exam - contact an exam supervisor.

If you become unwell contact an exam supervisor immediately and ask to speak to the lecturer.

Exam Conditions

You must place your bag at the front of the lab, as directed by the invigilator. Phones must be turned off (not just silenced) and not visible, either left in your bag or sealed in an opaque bag placed underneath your seat.

You must bring your student card, and can bring pens and a transparent, unmarked water bottle. We will provide you with blank paper that can be used for rough working. This will not be marked.

No other exam materials are allowed, including any electronic devices (including but not limited to phones, watches, calculators, laptops, and hand-held gaming devices).

Strict exam conditions apply, including that you must not attempt to communicate with any other person, or access other computers or external data or any internet resources.

If you do not follow these instructions you will get zero marks for the exam and a possible charge of academic misconduct.

If there are any issues during the exam, raise your hand and the invigilator will come over to you. If you have any questions about the exam, or about what is permitted, ask the invigilator.

If you need to go to the toilet, ask a supervisor.

You may be given extra time to compensate for any time lost due to computer or other problems. Exam Environment

The exam environment allows you to run a limited set of commands so you can test and debug your answers.

The exam environment is not your normal CSE account. If you have accidentally logged into your normal CSE account, let the invigilator know immediately.

The exam environment logs all your keystrokes. Biometric keystroke timing data may be used to confirm your identity.

The exam environment does not allow access to files in your CSE account or any other CSE account. It does not allow access to the web or other network access.

Some language documentation is available through the right-click menu. You also have access to manual entries ("man pages"). No other documents or files will be available to you.

During the first 35 minutes the only programs you can run in the exam environment are the applications to enter answers to part 1, clock (xclock), calculator (xcalc) and the PDF versions of language documentation and exam questions. The HTML version of language documentation and exam questions is not available during the first 35 minutes.

Autotests are available for all questions to assist you in your testing.

Passing autotests does not guarantee any marks.

Rough Paper

We will provide you with blank paper that can be used for rough working. This will not be marked.

Write your name on the top of each sheet of rough working paper you use.

You must hand in ALL writing paper at the end of the exam.

Submission

Answer each question in a SEPARATE file. Each question specifies the name of the file to use. These are named after the corresponding question number,

Make sure you use EXACTLY this file name.

Submit these files using the give command as described in each question. You may submit your answers as many times as you like. The last submission ONLY will be marked.

Ensure that you have submitted your files before signing out. Running autotests does not automatically submit your code. Test Data Files

There are example test data files for some questions.

These are placed in your exam environment directory automatically.

If you accidentally remove on of these files running the command create_example_files will recreate it.

Morning Session

Once the exam has commenced you may not leave until the end of the exam (first session only). Once the exam has ended and the invigilator has said you can leave, please leave the building as quickly and quietly as possible so that the second session students can take their exam.

Afternoon Session

You must assemble in the corralling room as specified on the exam seating page. You MUST arrive early. If you after 12:20pm, you will not be permitted to sit the exam.

You may not leave during the first 30 minutes or the last 10 minutes of the exam.

Question 18 (10 marks)

Your program must be C.

Name your program q18.c

Testing

You can test your program using the autotest command:

autotest q18 q18.c
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q18 q18.c

Question 19 (10 marks)

Your program must be MIPS asssembler.

Name your program q19.s

Testing

You can test your program using the autotest command:

autotest q19 q19.s
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q19 q19.s

Question 20 (10 marks)

Your program must be MIPS asssembler.

Name your program q20.s

Testing

You can test your program using the autotest command:

autotest q20 q20.s
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q20 q20.s

Question 21 (10 marks)

Your program must be C.

Name your program q21.c

Testing

You can test your program using the autotest command:

autotest q21 q21.c
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q21 q21.c

Question 22 (10 marks)

Your program must be C.

Name your program q22.c

Testing

You can test your program using the autotest command:

autotest q22 q22.c
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q22 q22.c

Question 23 (10 marks)

Your program must be MIPS asssembler.

Name your program q23.s

Testing

You can test your program using the autotest command:

autotest q23 q23.s
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q23 q23.s

Question 24 (10 marks)

Your program must be C.

Name your program q24.c

Testing

You can test your program using the autotest command:

autotest q24 q24.c
Also do your own testing!

Submission

Once you are satisfied with your solution, submit it by running
give q24 q24.c

Question 25 (10 marks)

.........

Question 26 (10 marks)

.........

Question 27 (10 marks)

.........