Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Seperate Compilation (use code posted below): Create a folder for each program that contains: a. all requisite program files (interface, implementation, application) b. a makefile
Seperate Compilation (use code posted below):
Create a folder for each program that contains:
a. all requisite program files (interface, implementation, application)
b. a makefile that cleans, and compiles a .exe application file
Remove all .o and .exe files from your submission. (should look something like this):
#include#include #include using namespace std; class RationalNumber { public: RationalNumber(): RationalNumber(0, 1) { } RationalNumber(int n): RationalNumber(n, 1) { } RationalNumber(int n, int d); int getNumerator() const { return numerator; } int getDenominator() const { return denominator; } void setNumerator(int n) { numerator = n; } void setDenominator(int d) { denominator = d;} void output() const { cout (const RationalNumber& n); bool operator =(const RationalNumber& n); bool operator >(istream& instream, RationalNumber& n); friend ostream& operator (const RationalNumber& n) { return numerator * n.denominator > denominator * n.denominator; } bool RationalNumber::operator =(const RationalNumber& n) { return numerator * n.denominator >= denominator * n.denominator; } istream& operator >>(istream& instream, RationalNumber& n) { cout > n.numerator; cout > n.denominator; while(n.denominator == 0) { cout > n.denominator; } return instream; } ostream& operator Rational Number HW5_driver.cpp HW5-RationalNumber.cpp HW5RationalNumber.h makefile Rational Number HW5_driver.cpp HW5-RationalNumber.cpp HW5RationalNumber.h makefile
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started