To take part in discussions on talkSFU, please apply for membership (SFU email id required).

CMPT 225 Assignment 2

edited June 2015 in General
I'm taking CMPT 225 this semester. Any one from the same class? I'm really stuck with the assignment 2, and don't know what to do at all. Is there any one that can help me? We can meet up and work together.

Comments

  • Hey there! Hopefully I can give you a bit of insight as to how the program works:

    We have to create the implementation for the CircularLinkedList and Playlist classes, so that they will work with the test driver to become a music playlist. Your Playlist implementation relies on making calls only to the CircularLinkedList class, so that (the list implementation) is the part you should focus on first.

    I was having quite a bit of trouble conceptually figuring out how to work the template class and program CircularLinkedList ... so I took a step back and converted it to an integer class, and created a separate project where I coded all of the functions as if they were for an integer class. Once I finished all the functions, I referred back to the class notes and turned it back into a template class. The CircularLinkedList class basically just creates a linked list that loops around itself both forwards and in the reverse directions, and has functions that will insert, remove, and check elements in the list. That part shouldn't be too hard to figure out, the only tricky parts I found were keeping tabs on the next/prev pointers and figuring out conceptually how the list was supposed to work. My work desk here is riddled with diagrams of linkedlists, it's a good idea to break it down and draw it out. Your CircularLinkedList class will also want to throw exceptions when invalid inputs are given.

    Playlist class basically just makes calls to the CircularLinkedList class to insert Song data types (already implemented by Tien) and update a "nowplaying" counter.

    As mentioned in class today, they're going to be really testing the CircularLinkedList class by inserting/removing items at all different locations in the list, so your code should be ready to handle a multitude of different cases. At all else, I would make sure to get this portion done prior to submission!

    I'm currently finishing up my code, so I won't be able to explicitly help you today, but I'm always down for a study sesh or program breakdown in the future if you want to shoot me a PM. 

    Cheers, and good luck!
  • Any link to the assignment?
  • Thank you so much aptmac. Your comment did help me a bit. 
    And to climbon, (http://www.cs.sfu.ca/CourseCentral/225/gtien/assignments.html) this is the link. Although I'm quite sure you can't access it unless you are a student from my class.
  • edited June 2015

  • I am also taking 225 this sem, and would love to be part of some ad-hoc study sesh :D

Leave a Comment