Method Names Changed for completeness

This commit is contained in:
2016-10-08 21:39:21 -04:00
parent 9b2d32e8a3
commit 82ffc6e50b

View File

@ -7,7 +7,7 @@ class Queue():
"""Enqueues {@code item} """Enqueues {@code item}
@param item @param item
item to enqueue""" item to enqueue"""
def enqueue(self, item): def put(self, item):
self.entries.append(item) self.entries.append(item)
self.length = self.length + 1 self.length = self.length + 1
print(self.entries) print(self.entries)
@ -16,7 +16,7 @@ class Queue():
@requirement: |self.length| > 0 @requirement: |self.length| > 0
@return dequeued @return dequeued
item that was dequeued""" item that was dequeued"""
def dequeue(self): def get(self):
self.length = self.length - 1 self.length = self.length - 1
dequeued = self.entries[0] dequeued = self.entries[0]
self.entries = self.entries[1:] self.entries = self.entries[1:]
@ -28,7 +28,7 @@ class Queue():
return self.entries[0] return self.entries[0]
"""Returns the length of this.entries""" """Returns the length of this.entries"""
def length(self): def size(self):
return self.length return self.length