Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/etc/Job/PieceWorker.inl

Go to the documentation of this file.
00001 // Implementation of class PieceWorker
00002 #ifndef __J2K__PieceWorker_INL__
00003 #define __J2K__PieceWorker_INL__
00004 
00005 #include <j2k/Fred/Job/PieceWorker.hpp>
00006 
00007 // Constructor for class PieceWorker
00008 inline PieceWorker::PieceWorker(
00009    const char* first, const char* last, double w, UINT qty )
00010    : Employee( first, last ), wagePerPiece( w ), quantity( qty ) { }
00011 
00012 // Set the wage
00013 inline void PieceWorker::setWage( double w ) {
00014   wagePerPiece = w;
00015 }
00016 
00017 // Set the number of items output
00018 inline void PieceWorker::setQuantity( UINT qty ) {
00019   quantity = qty;
00020 }
00021 
00022 // Determine the PieceWorker's earnings
00023 inline double PieceWorker::earnings() const {
00024   return (quantity * wagePerPiece);
00025 }
00026 
00027 // Print the PieceWorker's name 
00028 inline void PieceWorker::printName() const
00029 {
00030    cout << "\n     Piece worker: ";
00031    Employee::printName();
00032 }
00033 
00034 #endif

Generated on Sun Oct 14 18:46:31 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001