Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*Matt Short
- CPSC 131
- Purpose: Create a header file holding the 6 functions
- needed for the menudriver
- */
- //SPECIFICATION FILE (ROMANTYPE_H)
- class RomanType //declares a class data type
- {
- public: //6 Public Functions
- void getArabicNumber();
- /* Function: Gets Arabic Numbers
- Precondition: none
- Postcondition: user is prompted for an arabic number,
- which is then retrieved
- */
- void getRomanNumber();
- /* Function: Gets Roman Numeral
- Precondition: none
- Postcondition: user is prompted for a roman numeral,
- which is then retrieved
- */
- void printRoman();
- /* Function: Prints Roman Numeral
- Precondition: arabic number is converted to a roman numeral
- Postcondition: converted number is printed
- */
- void printArabic();
- /* Function: Prints Arabic Number
- Precondition: roman numeral is converted to an arabic number
- Postcondition: converted number is printed
- */
- void convertToRoman();
- /* Function: Convert an Arabic number to a Roman numeral
- Precondition: user has entered a correct arabic number
- Postcondition: arabic number is successfully converted to
- a roman numeral
- */
- void convertToArabic();
- /* Function: Converts a Roman Numeral to an Arabic number
- Precondition: user has entered a correct roman numeral
- Postcondition: roman numeral is successfully converted to
- an arabic number
- */
- RomanType();
- /* Function: constructor
- Pre:No instance of class RomanType exists
- Post:An instance of class RomanType is created
- */
- ~RomanType();
- /* Function: destructor
- Pre:At least one instance of class RomanType exists
- Post:No instances of class RomanType exists
- */
- private: //2 private variables
- int arabicInput; //variable to hold arabic input
- char romanInput[50]; //variable to hold roman input
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement