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.