Bitcoin Forum

Economy => Services => Topic started by: Kiilu on May 28, 2017, 07:30:57 AM



Title: ✪Write a simple C++ code for $2✪
Post by: Kiilu on May 28, 2017, 07:30:57 AM
Write a full implementation of the narrative

In a world where no same sex marriages are allowed,a man can marry a woman and a woman can likewise marry a man. since both a woman and a man are human beings,each of them has a gender, a name and may have a spouse who must be of the opposite sex.
in this world only the government can effect divorce between a married couple and only the government can effect marriage between a couple.
This,the government does by sending a 'divorce' or a 'marry' message to either party.
the government can only send the divorce to a human who is married and 'marry' to a human who is single.

(Object oriented using C++)


Title: Re: ✪Write a simple C++ code for $2✪
Post by: shaw1 on May 28, 2017, 02:17:54 PM
Er, not sure exactly what you are asking for here...

And while the code may be simple, $2 is not likely to get people very interested... You'd lose that just in transaction fees!  ;D


Title: Re: ✪Write a simple C++ code for $2✪
Post by: DarkStar_ on May 28, 2017, 02:29:23 PM
Your description is very confusing. How are people generated? Does the "government" send a message every x seconds, or randomly? Does it require user input, or a GUI, or can it all be done through the console?

Doesn't seem very hard to code, but your post is very vague on what you need making it very hard for a programmer to get exactly what you need. I'm not very familiar with C++, but if you want to try it yourself, you can try having different people on different arrays, with their name, their gender and who they are married to. Then you just have to run loops where the government randomly selects 2 people, sees if they are married to each other or both single, and than do the command needed.


Title: Re: ✪Write a simple C++ code for $2✪
Post by: @prashant on May 28, 2017, 07:31:20 PM
Your description is very confusing. How are people generated? Does the "government" send a message every x seconds, or randomly? Does it require user input, or a GUI, or can it all be done through the console?

Doesn't seem very hard to code, but your post is very vague on what you need making it very hard for a programmer to get exactly what you need. I'm not very familiar with C++, but if you want to try it yourself, you can try having different people on different arrays, with their name, their gender and who they are married to. Then you just have to run loops where the government randomly selects 2 people, sees if they are married to each other or both single, and than do the command needed.
Plus use that array as an argument in a function.before that make a class and then its object.then call the function to execute result.you can also do it with file handling which is more easy and understandable.


Title: Re: ✪Write a simple C++ code for $2✪
Post by: maarx on May 29, 2017, 02:54:18 AM
Code:
cout << "In a world where no same sex marriages are allowed,a man can marry a woman and a woman can likewise marry a man. since both a woman and a man are human beings,each of them has a gender, a name and may have a spouse who must be of the opposite sex.
in this world only the government can effect divorce between a married couple and only the government can effect marriage between a couple.
This,the government does by sending a 'divorce' or a 'marry' message to either party.
the government can only send the divorce to a human who is married and 'marry' to a human who is single.";


Title: Re: ✪Write a simple C++ code for $2✪
Post by: tobi4255 on May 29, 2017, 09:07:45 AM
Write a full implementation of the narrative

In a world where no same sex marriages are allowed,a man can marry a woman and a woman can likewise marry a man. since both a woman and a man are human beings,each of them has a gender, a name and may have a spouse who must be of the opposite sex.
in this world only the government can effect divorce between a married couple and only the government can effect marriage between a couple.
This,the government does by sending a 'divorce' or a 'marry' message to either party.
the government can only send the divorce to a human who is married and 'marry' to a human who is single.

(Object oriented using C++)

I don't see why anyone would bother doing this task for only 2$..

I also fail to see why you are interested in having someone do this for you. If it is an assignment you have been given, say if you are learning object-oriented programming, then you better solve it yourself and not miss out on the knowledge.

If it is not an assignment, if you are just looking for code to learn from then try places such as stackoverflow or a subreddit for c++.

Best of luck with it, in any case. :)