Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++, Throwing and Catching

Name: Anonymous 2005-03-04 15:26

PROGRAM 6                EXCEPTION HANDLING            
        
------------------------------------------------------------------------- 

 1. Define an Employee class.
    a) has data members EmpNum and Pay.
    b) EmpNum has format XXX-Y where each X is a digit in {0-9} and
       Y is a letter in {A-M}.
    c) Pay is in {1000-7000}.
    d) member function SetEmpNum to validate and assign value to EmpNum.
    e) member function SetPay to validate and assign value to Pay.
    f) constructor to accept values for EmpNum and Pay.
    g) exception InvalidEmpNum to be thrown from constructor when an
       invalid value for EmpNum is received.
    h) exception InvalidPay to be thrown from constructor when an
       invalid value for Pay is received.
  
 2. Write a test program to demonstrate the exceptions.
 
 
 -------------------------------------------------------------------------

Submit Source Code listing your solution and results

Discuss

Name: Anonymous 2013-07-23 16:15

>>21
Can't Haskell be modeled with a less gay math known as Abstract Algebra?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List