Having trouble with school project

This is my assignment for my programming class at school and I am so confused and really need help with this. Here is the assignment. Please help if you can.

Write a Math class which contains 4 functions which calculate following:

1.) The result of x^y.
2.) The floating point equivalent for an input fraction.
3.) A plot point for f(mx+y).
4.) A plot point for f(mx+y^n).

Write a main test class which does the following:

1.) Creates a Math object from your Math class.
2.) Uses the Math object to:
a.) Print the results of 2^0 thru 2^31.
b.) Print the results of the inverse of the first 25 prime numbers.
c.) Print the series of coordinates which results from: m=1 thru 25 given x=10 and y=10.
d.) Print the series of coordinates which results from: n=1 thru 25 given m=1, x=10, and y=10.
So which task do you have problems and with what exactly? Where is the code you've written so far?
okay. well really i don't understand it very well and i think i have the first part but right now i'm stuck on the floating point equivalent. its 3 files...

#include <iostream>
using namespace std;

class Math
{
private:

public:


int power(int x, int y);
int result;
float divide(int x, int y);

};





------------------------------------------------







#include "Math.h"

int Math::power (int x, int y)
{
int result = 1;
for (int count = 0; count < y; count ++) //run y times
result = result * x;

return result;
}
float Math::divide(int x, int y)
{
return x/y;
}




-------------------------------------------------------




#include <iostream>
#include "Math.h"

using namespace std;

int main()
{
Math myMathLibrary;
for (int mCount = 0; mCount < 32; mCount++)
{
cout << myMathLibrary.power (2,mCount);

}

}
int isprime = 0;
int range = 100;
for( int i = 2 ; i <= range ; i++)
{
isprime = 1;

for( int j = 2 ; j <= i ; j++)

{

if( i == j)

{

continue;

}

else if( i % j == 0)

{

isprime = 0;

}

else

{ // do nothing

}

}

if(isprime)

{

// insert your test code here -

// variable i will be a series of prime numbers

// from 2 to 97

}

else

{ // do nothing

}
return 0;
}
Topic archived. No new replies allowed.