Mechatronics
Documentation for ME 405 labs
Vendotron.Currency Class Reference

A small struct representing a denomination of US currency. More...

Public Member Functions

def __init__ (self, key, value)
 Create a Currency object. More...
 

Static Public Member Functions

def currency_list (bitmap)
 Generate a list of accepted denominations from all possible US denominations. More...
 

Public Attributes

 key
 
 value
 < The keyboard key that triggers inserting this Currency #
 

Detailed Description

A small struct representing a denomination of US currency.

Constructor & Destructor Documentation

◆ __init__()

def Vendotron.Currency.__init__ (   self,
  key,
  value 
)

Create a Currency object.

Parameters
keyThe keyboard key to trigger inserting one of these (must be a string that describes a key name)
valueThe value of the currency in USD (must be a float)

Member Function Documentation

◆ currency_list()

def Vendotron.Currency.currency_list (   bitmap)
static

Generate a list of accepted denominations from all possible US denominations.

Parameters
bitmapA bitmap (int) where high bits indicate selection of the denomination in lexical order
Returns
A list of currency objects, sorted in ascending order by value

The documentation for this class was generated from the following file: