Can someone write this program for me

Soccerman06

Diamond Member
Jul 29, 2004
5,830
5
81
I need someone to write this program(completely) and describe whats happening, or atleast some of it so I can figure it out.

*** This is not homework, this is to help me study for final ***

program:

store the numerator and denominator in the fraction class.
Pre- numer and denom contain the numerator and denominator respectively
post- data sotered

and then print the function.

Edit: please write it so that it will work in visual studies 2003 so I can play around with stuff.

plz
 

episodic

Lifer
Feb 7, 2004
11,088
2
81
You will get help much faster if you post what YOU have done so far. Most ppl here learned their trades through the sweat of their brains (haha) and are not willing to 'give it away' - however, many will tutor you in the ways of the the jedi, ermm . . . I mean programming :)
 

Soccerman06

Diamond Member
Jul 29, 2004
5,830
5
81
Originally posted by: agnitrate
Can you give us what you've got so far? Or perhaps a nicer description?

Thats all that is given in the question.

what I have done:

class Fraction
{
Private:
int numererator;
int denominator;
Public:
void store (int numer, int denom);
void print () const; //What does const mean? (is it like a global const?)
} //Fraction


 

Soccerman06

Diamond Member
Jul 29, 2004
5,830
5
81
Originally posted by: rsd
might want to study english too

Nah dude, english isnt a priority right now, I have a calc test tomorrow at 10am so I am more concerned about that than my grammer. Besides that grammer is good enough.
 

Soccerman06

Diamond Member
Jul 29, 2004
5,830
5
81
Oh I also have another question, for the final, our teacher said there would be something on acm code of ethics. I went to the acm website, www.acm.org, but couldnt find anything about code of ethics, could someone point me to the acm code of ethics on their site if they know where it is. Would be helpful.
 

MrBond

Diamond Member
Feb 5, 2000
9,911
0
76
Originally posted by: Soccerman06
Oh I also have another question, for the final, our teacher said there would be something on acm code of ethics. I went to the acm website, www.acm.org, but couldnt find anything about code of ethics, could someone point me to the acm code of ethics on their site if they know where it is. Would be helpful.
Found this with Google:

http://onlineethics.org/codes/ACMcode.html
 

Soccerman06

Diamond Member
Jul 29, 2004
5,830
5
81
Originally posted by: MrBond
Originally posted by: Soccerman06
Oh I also have another question, for the final, our teacher said there would be something on acm code of ethics. I went to the acm website, www.acm.org, but couldnt find anything about code of ethics, could someone point me to the acm code of ethics on their site if they know where it is. Would be helpful.
Found this with Google:

http://onlineethics.org/codes/ACMcode.html

Thanks
 

DaShen

Lifer
Dec 1, 2000
10,710
1
0
Originally posted by: Soccerman06
Originally posted by: agnitrate
Can you give us what you've got so far? Or perhaps a nicer description?

Thats all that is given in the question.

what I have done:

class Fraction
{
Private:
int numererator;
int denominator;
Public:
void store (int numer, int denom);
void print () const; //What does const mean? (is it like a global const?)
} //Fraction

nm
 

Markbnj

Elite Member <br>Moderator Emeritus
Moderator
Sep 16, 2005
15,682
14
81
www.markbetz.net
void print () const; //What does const mean? (is it like a global const?)

The const after the function signature means that the function is const, and will not change the state of a const object. Therefore it can be called on a const object.

And, for what it's worth, grammar and spelling and punctuation do matter, especially when you are posting a note asking for help, and what you want can barely be understood.

Programming is a technical and precise discipline. If you are not prepared to be precise in talking about it, please study something more forgiving, such as needlepoint.
 

jdport

Senior member
Oct 20, 2004
710
0
71
If they are testing you on things like ACM ethics, my guess is that they gave them to you in class... did you go?
Or don't you know somebody who did?