edu.pdx.cs399J.net
Class McDonalds

java.lang.Object
  extended by edu.pdx.cs399J.net.McDonalds

public class McDonalds
extends Object

This class models a McDonalds. There are a bunch of McCustomers who all want a BigMac(tm). There are a bunch of liberal arts majors, er, McEmployees who cook the BigMacs(tm). Each McCustomer and McEmployee runs in his or her own thread.


Constructor Summary
McDonalds(int nBigMacs)
          Creates a new McDonalds with a given number of BigMacs to cook.
 
Method Summary
static void main(String[] args)
          Read the number of McCustomers and the number of McEmployees from the command line.
 boolean moreBigMacs()
          Returns true if there are more BigMacs to cook.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

McDonalds

public McDonalds(int nBigMacs)
Creates a new McDonalds with a given number of BigMacs to cook.

Method Detail

moreBigMacs

public boolean moreBigMacs()
Returns true if there are more BigMacs to cook.


main

public static void main(String[] args)
Read the number of McCustomers and the number of McEmployees from the command line. Spin off threads for each one and what minimum wage at work.



Copyright © 2000-2009 Portland State University. All Rights Reserved.