COMP1511 19T2
COMP1511 19T2
  1. Your tutor has asked a lab pair to present their week 9 work.

    Discuss the good, the bad and the ugly aspects of their code.

    Please be gentle in any criticism - we are all learning!

  2. It's week 10! Well done on making it this far through the course, you've all worked very hard, and achieved some incredible results, and you should all feel proud about how far you've come in these ten short weeks. Take some time as a tute to look back over the semester, and think about how it has been for you. What were your favorite parts? What things weren't so good? And perhaps most importantly, who/what are you grateful for?
  3. How are you progressing with the assignment?

    Do you have any questions? Have you learned anything that would be useful to share with the rest of the tutorial?

  4. What is the purpose of a Header file?
  5. What is the purpose of a Implementation file?
  6. I have two files, a list.h and a list.c that describe a particular form of list that I want to use.

    I then have a main.c that would like to use the functionality offered by the other two files.

    Which files need to #include the other files?

    What is the compilation command that will combine these files into a single program?
  7. What is a queue?
  8. Draw a diagram of a queue, if it was implemented by a Linked List. Show:
    • How the linked list is structured, with a head pointer and pointers between nodes
    • Which end of the list is the front and back of the queue
    • Any extra structure(s) that might be needed to manage the queue
    • What happens when a new object is added to the queue
    • What happens when an object is removed from the queue
  9. Keeping the same diagram, show what changes you'd need to make to turn this structure into a stack?
  10. Given the abstract structure you have drawn for a queue, write the code that will represent your queue as well as the function to add an element to the queue.

    You will need to show what code goes in the header file and what code goes in the implementation file.

    We can assume that the data we're holding in each element of the queue is an integer.

    Revision questions

    The remaining tutorial questions are primarily intended for revision - either this week or later in session.

    Your tutor may still choose to cover some of the questions time permitting.

    There are no revision questions as part of this tutorial. Instead, this week, we will release a revision section on the course website that will be a set of revision questions and exercises that cover the majority of the course content.