Lab 8: Object Oriented Programming

Logistics

  • Due: Tuesday, June 25th no later than 5pm.
  • Submission instructions: upload solution, entitled FirstName-LastNameLab8.py to the BrightSpace Lab 8 Dropbox.
  • Deadline reminder: once this deadline passes, BrightSpace will no longer accept your Python submission and you will no longer be able to earn credit. Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned.

Learning outcomes

Gain experience with object oriented programming.

Hint

Check out the magic methods for Python classes.

Assignment

  • In this assignment, you will use object-oriented programming to implement a data structure called a queue. An example of a queue is a concert line for tickets (with no cutting allowed): the first person to arrive goes first, the second person to arrive goes second, etc. The line can grow and shrink dynamically over time.
  • Download lab8.py, rename it according to the instructions above, and make sure you understand it.
  • Take the program above and modify it by adding the missing Queue class such that when the program is run, it produces this output.

Grading - 10 points

3 points - High Rolls are identified correctly.

3 points - Three of a Kinds are identified correctly.

4 points - Large straights are identified correctly.

Grading turnaround

All labs graded with scores recorded in BrightSpace no later than lab time (2pm) the following day.