QUIZ 3 SOLUTION
    1. class CL
      {
      	private			//missing
      		int a;
      		float x=4.5;	//cannot initialize member data.
      	public 
      		void CL(int a, float b=0.0);	//constructor does not have 
      						//return type.
      		PrintCl(void);
      						//missing;
      }
      
    2. class CL
      {
      	private			//missing
      		int data;
      	public 
      		CL(int n=5);	
      		void Update(int m) const;	//update method cannot be a constant method
      };
      
      CL;CL(int n=5):n(data)		//should be class scope operator::
      {}				// do not repeat default n=5; assignment is data(n)
      
      void CL;Update(int m) const		//should be class scope operator ::
      {
      	data=m;				//not a constant method
      }
      
    3. class CL
      {				// add public otherwise the constructor is private
      		CL(int x):data(x)
      		{}
      	private:
      		int data;
      };
      
  1. False
  2. True
  3. False
    1. float Pay(float rate) const;
    2. void UpdateHours(const in hours);
    3. Payroll::Payroll(int level, int hours):ovtlevel(level)
    4. regular=(hours>ovtlevel)?ovtlevel:hours;
      overtime=(hours>ovtlevel)?hours-ovtlevel:0;
    5. For each declaration give the initial values
      			Regular		Overtime
      			------		--------
      
      Payroll emp1(30, 15);	15		  0
      Payroll emp2(40);	 0		  0
      Payroll emp3(40,60);	40		 20
      Payroll emp4;		 0		  0
      
    6. Boss.UpdateHours(7);
      cout << Boss.Pay(20) << endl;
      
    7. Payroll arr[3]={Payroll(35), Payroll(20), Payroll(40)};
    8. $300 $440 $475
  4. Only 1 and 2
    1. 8
    2. 8
    3. 5
    4. 12
    1. 3
    2. 0