COMP6771 final exam


  • 作业标题:COMP9021 - Final Exam
  • 课程名称:University of New South Wales COMP6771 Advanced C++ Programming
  • 完成周期:1天

1. Question

1.1. Question 1: Path Printer

Background: Computers are very good at handling data and mathematical descriptions of real-world objects. Humans on the other hand are visual creatures: unless we can see something, it is very difficult for us to manipulate it.

Take, for example, the path of a hypothetical hero walking through a 2D grid or map. Whereas computers are content knowing the bounding-box of the map and the moves made by the hero, humans would need to see the grid and have a visual distinction between points or tiles trodden by the hero and those not walked on.

Luckily, COMP6771 students are the bridge between computers and humanity.

1.2. Question 2: Scope Guard

Background: As we have learnt, resource safety and finalistic destruction is one of the reasons why C++ is so widely used. As a reminder, the primary idiom around resource safety is RAII:

  • Resource
  • Acquisition
  • Is
  • Initialisation

RAII is implemented by acquiring resources in a class-type’s constructor and releasing that resource in its destructor.

This mechanism works extremely well, but having to write a custom class type for every resource can be a prohibitive hassle.

We can do better.

2. Marking Criteria

Your performance in your exam will be determined by the result of automated marking. We will compile your program, and run it against a series of tests that assess whether your program behaves as required. You will not know the full sample of tests used prior to marking.

Code that does not compile risks receiving no automarks for that question.

If you submit your work and your tentative grade is nearing a fail of any hurdle, and it’s due to trivial and easily-resolvable errors (the definition of easily-resolvable is at our discretion), we may modify your code and run it again.

3. Submission

Our systems automatically record the most recent push you make to your master branch. Therefore, to “submit” your code you simply need to make sure that your master branch (on the gitlab website) is the code that you want marked for this task.

It is your responsibiltiy to ensure that your code can be successfully demonstrated on the CSE machines (e.g. vlab) from a fresh clone of your repository. Failure to ensure this may result in a loss of marks.

Please note: Remember to ensure your code works on the UNSW CSE machines. If you develop on Vlab this is probably fine, but if you’ve developed locally ensure it runs on vlab OK. Failure to do so could result in a fail mark in the exam.

。。。


文章作者: IT神助攻
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 IT神助攻 !
  目录