we

433434
Last edited on
Just about everyone here has done this homework themselves at some time past.

If you are stuck, email or visit your professor.

If you can't make it through the class, drop it and take it again when you are ready.
No I'm not stuck in the class, I'm just asking if someone is bored and wants to do it they can do it. It's not like they have to do it and this was the only assignment I'm kind of confused on.
If you can help me, this is what I have so far for the class.

class fraction {
public:
int denom;
int numer;
void set (int denom, int numer);
void print();
fraction multipliedBy(fraction f2);
fraction dividedBy(fraction f2);
fraction addedTo(fraction f2);
fraction subtract(fraction f2);
bool isEqualTo(fraction f2);
};
fraction fraction::multipliedBy(fraction f2)
{
fraction result;
result.set(f1.multipliedBy(f2)); // multiply as needed...
return result;
}
fraction fraction::dividedBy(fraction f2)
{
fraction result;
result.set(f1.dividedBy(f2)); // divide as needed...
return result;
}

fraction fraction::addedTo(fraction f2)
{
fraction result;
result.set(f1.addedTo(f2)); // add as needed...
return result;
}

fraction fraction::subtract(fraction f2)
{
fraction result;
result.set(f1.subtract(f2)); // subtract as needed...
return result;
}
closed account (48T7M4Gy)
http://www.cplusplus.com/forum/general/195007/

You might need to help the person at the above who is a bit behind and might enjoy being on your team. :)
Topic archived. No new replies allowed.