Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Queues - Tamiko Terada - stacks-queues-jobsimulation #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TamikoT
Copy link

@TamikoT TamikoT commented Feb 27, 2017

Stacks and Queues

Thanks for doing some brain yoga. You are now submitting this assignment!

Comprehension Questions

Question Answer
What is an ADT? abstract data type!
Describe a Stack objects organized like a stack of books--last in, first out
What are the 5 methods in Stack and what does each do? 1. push, adds element 2. pop, removes and returns last-in object 3. empty?, T/F for data inside, 4. top, to see the last-in item, size, how many items in stack
Describe a Queue objects organized like British people in line for some crumpets--first in, first out
What are the 5 methods in Queue and what does each do? 1. enqueue, add element to back of the line 2. dequeue, remove and return first-in object, 3. empty? T/F for data inside? 4. front, to return first-in item, 5. size, how many items in line
What is the difference between implementing something and using something? implementation is about creating something like a class or method before using it

OPTIONAL JobSimulation

Question Answer
Did you include a sample run of your code as a comment? no, but i will now...

end

def dequeue
if @store.length == 0
raise ArgumentError.new "Nothing in your queue!"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@@ -5,11 +5,20 @@ class JobSimulation
attr_reader :workers, :waiting, :roll

def initialize (jobs_available, job_seekers)
number_of_workers = jobs_available # available are filled and become employees

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the point of making this variable? What did you gain by making it?

@sudocrystal
Copy link

Stacks and Queues

What We're Looking For

Feature Feedback
Implementation of Stack looks complete yes
Implementation of Queue looks complete yes

OPTIONAL JobSimulation

Extension Feedback
Does the code solve the problem to specification? yes
Is the code easy to follow? yes
Does the output look good? yes
Were provided variables and methods used appropriately and not altered in name or definition? yes
Were any new variables and/or methods made private to the class? yes

This looks great! Nice job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants