#ifndef _RATIONAL_H #define _RATIONAL_H #pragma once class Rational { public: // constructor Rational(int n = 0, int d = 1); // sets to n / d bool set(int n, int d); // accessor functions int num() const; int den() const; // returns decimal equivalent double decimal() const; private: int num_, den_; // numerator and denominator }; #endif