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

Theresa's stacks-queues #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TheresaManney
Copy link

… to look at the extra Job Simulation assignment.

Stacks and Queues

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

Comprehension Questions

Question Answer
What is an ADT? Stands for Abstract Data Types and is a way we store data.
Describe a Stack A Stack is 'last in first out' so the only item that can be accessed is the most recent item that was added.
What are the 5 methods in Stack and what does each do? 1. push(e) - this will push an element to the end of a stack. 2. pop() - this will remove the element of the top of the stack (the last item in an array), 3. empty? - will check if a stack is empty. 4. top() - will tell you the element at the top of the stack but will not remove it from the stack like pop() does. 5. size() - Will return how many elements are in the stack.
Describe a Queue A Queue is 'first in first out' the element are added at the end of the queue but the only item that can me accessed is the first item in the queue.
What are the 5 methods in Queue and what does each do? enqueue(e) - This method will add an item to the end of the queue 2. dequeue - dequeue will remove the first item from the queue 3. empty? - will check to see if a queue is empty and will return a boolean value 4. top() - will return the value that is in the front of the queue but will not remove the item. 5. size() - will return the number of elements in the queue similar to using .length for finding how many items are in an array
What is the difference between implementing something and using something? Implementing can be thought of as a tool, we can have an understanding of how it can be used and what it can be used for. Using something would be to actually use the tool to loosen or tighten a bolt for example. Implementing is a base understanding and thought of and using is the action of actually doing something from what I understand...

OPTIONAL JobSimulation

Question Answer
Did you include a sample run of your code as a comment?

… to look at the extra Job Simulation assignment.
@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

Looks good!

OPTIONAL JobSimulation

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

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