PROJECT3_DR (2).py - ' Project #3 Coffee Vending machine...

This preview shows page 1 - 2 out of 3 pages.

'''Project #3 Coffee Vending machineDavid ReyesThi is the first objected oriented programming projectshowing how a coffe vending machine would work by receivingcertain commands depending on how much money is inserted.'''# Josh: good documentation# Josh: it's best to have a file for each class definition then import thoseclasses into the main file#class #1class coffee_machine:prompt = \'''PRODUCT LIST: all 35 cents, except bouillon (25 cents)1=black, 2=white, 3=sweet, 4=white & sweet, 5=bouillonSample commands: insert 25, select 1.>>> Your command: '''# Josh: good use of multi-line stringdef __init__(self):self.cashbox = CashBox()# Josh: cashbox and selector attributes shouldbe private access as they are in the UML class diagram. The '-' next to theattributes in the diagram means private access. Example below:# Josh: self.__cashbox = Cashbox()#Define products within the vendig machineblack = Product("black", 35, ['cup', 'coffee', 'water'])# Josh: goodimplementation!

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 3 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Spring
Professor
CharlesD.Allison
Tags
Subroutine, Josh

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture