MedVision ad

Comp125 anyone? (1 Viewer)

Mini

relax
Joined
Nov 13, 2003
Messages
83
Location
here... duh
Gender
Female
HSC
2003
A wrenching subject indeed... I was just wondering if anyone that has done this course before happens to have past papers? i can't find any...

Also, for anyone doing it this year, insights into assignment 3? Its a brain bender, that one...
 

doe

Member
Joined
Jan 23, 2004
Messages
751
Gender
Undisclosed
HSC
N/A
past papers for comp subjects are iffy, if they're not on the library reserve website, you're probably not going to get them. For comp subjects at least, when you take the exam and the paper is pink you're not allowed to keep it. I think this is mainly so the lecturers can just change some minor details and rehash the exams :>

re the assignment, you need to think about the different types data you have and the relations they share, and how you want to use that data. take representing the maze thingy.

- you have a set of nodes representing caverns
- each node can has links to many other caverns (a one to many relationship).

- you want to be able to tell if a given node has a lighted candle
- you want to find the next node the minotaur will go to (determined alphabetically)

i think a good way to do this would be to use the stl map class to represent the labyrinth. you would also need a smaller class/struct for a node (the pair class might be good), which would store the character with the cavern name (eg 'A' or 'B' or ...) and a flag if theres a candle in it. then you would map this cavern struct to a list of characters representing the other caverns there is a path to. so it would look sortof like this

A -> B,C,D
B -> A,D
D -> B,G

and so on. This says from A you can get to B,C, and D, from B you can get to A,D etc.

hopefully this should give you a start, its important you gain experience in working out how to do this stuff for youself, so i wont go into more detail.

As a final note, just yesterday i got a copy of "The C++ Programming Language, 3rd Edition" by Bjarne Stroustrup, the guy who created C++. Its really good and i wish i had it when i was in 2nd year, it explains heaps about C++ that i never understood. There are (illegal) free copies available online, but books are much easier to use when you want to jump around from section to section. It will probably save you much hair pulling, and worth the $ if you're doing a comp degree. Theres a whole lot of shit textbooks/references on C++ and lecturers seem to love choosing them as texts.
 
Last edited:

Mini

relax
Joined
Nov 13, 2003
Messages
83
Location
here... duh
Gender
Female
HSC
2003
thanks doe, this makes a lot of sense. however, i don't know anything about maps and will probably end up doing it all through arrays and linked lists - the logic is great help though.

its due in two weeks so i have plenty of time :S - lol. apparently a lot of marks come from the accompanying two page report, which is good.

doesn't look like i'll be finding past papers :(

thanks again for all the help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top