Recent Changes - Search:

Test

edit SideBar

ClassMixtures3

Complex example here, would be nice as a PBL

a LEGO toy factory example, group work

a LEGO factory has machines of the following function:

  paint
  package
  assemble

factory produces the following kinds of LEGO toys:

  car
  figurines
  blocks

in addition, the factory has a general parts container with the following properties:

  number of wheels
  number of faces
  number of shapes

a factory box is a simple

The management has decided that the manufacturing process is guided by following (unchangeable) function:

def manufacture(parts):

    """
    Manufactures the parts into a LEGO toy

    parts -- Parts
    return -- Toy
    """
    return package(paint(assemble(parts)))
Edit - History - Print - Recent Changes - Search
Page last modified on September 28, 2010, at 03:10 PM