A community for students.
Here's the question you clicked on:
 0 viewing
petew71
 2 years ago
week 6. Ex 3.6your first class. Queue class.
I'm assuming that this class needs to be a list?
I can not work out how to incorporate a list into a class and how to modify it!..Or am i barking up the wrong tree with this one? Any assistance would be welcome!
petew71
 2 years ago
week 6. Ex 3.6your first class. Queue class. I'm assuming that this class needs to be a list? I can not work out how to incorporate a list into a class and how to modify it!..Or am i barking up the wrong tree with this one? Any assistance would be welcome!

This Question is Open

AppylPye
 2 years ago
Best ResponseYou've already chosen the best response.1petew71: You could implement the Queue using a list, but there other other choices as well. Here is a an implementation of the Queue class using a list: http://ideone.com/zKA2YP For another implementation that does not use a list, and is a little more complex, take a look at this one: http://ideone.com/WCxNBy

petew71
 2 years ago
Best ResponseYou've already chosen the best response.0Hi there AppylPye. Thanks for your response! I asked around and came up with a program very similar to your list example. Though my remove method is a little different. http://pastebin.com/2EnAHEYM Your other, more complex, program is far better than i can do at the moment! Very well done!
Ask your own question
Sign UpFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.