The DejaVU Framework -- hush 3.1

include: professional-program-26-CarFactory-CarFactory.h /cygdrive/d/www/media


- [up] [top] - index make include source logic grammar scripts html configure mx slides talks scenes reports projects
<body bgcolor="#FFFFFF" text="#000000">

<blockquote> CarFactory.h </blockquote>



// For this example, the Car class is assumed to already exist.
include <Car.h>

<h4 align=right text=red> CarFactory</h4><hr>
  class CarFactory
{
 public:
  CarFactory();

  Car* requestCar();

  int getNumCarsInProduction() const;

 protected:
  virtual Car* createCar() = 0;

 private:
  int mNumCarsInProduction;
};
<hr>


<hr>

FordFactory</h4>
  class FordFactory : public CarFactory
  {
   protected:
    virtual Car* createCar();
  };


  
  

ToyotaFactory</h4>
  class ToyotaFactory : public CarFactory
  {
   protected:
    virtual Car* createCar();
  };


  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author. <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-2780434-1"; urchinTracker(); </script>

Hush Online Technology
hush@cs.vu.nl
10/19/08