| | |
c++ coding assignment!
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: May 2007
Posts: 1
Reputation:
Solved Threads: 0
Create a class called DateProfile that has the following private instance members:
You should supply all of the following (at a minimum):
http://etudes-ng.fhda.edu/access/con...a_Ass7_pic.jpg
Make sure all mutators, constructors and other methods that affect private data adequately test for illegal values and, if possible, return a boolean that reports the results of this test..
- gender - a char, the gender of the applicant.('M' or 'F').
- search_gender - a char, the gender ('M' or 'F') of desired partner (this is not the gender of the applicant, but of the applicant's requested partner.
- romance - an int from 1 to 10, indicating the importance of romance to the applicant.
- finance - an int from 1 to 10, indicating the importance of finance to the applicant.
- name - a string indicating the full name of the applicant.
You should supply all of the following (at a minimum):
- Accessors and Mutators for each field (instance member). For example: char GetGender() and bool SetGender(char gdr).
- Constructors that take no parameters (default) and all 5 parameters.
- double FitValue(DateProfile partner), which returns a number from 0.0 (very bad fit) to 1.0 (perfect fit). The public instance method compares the calling object (this) to the object passed as a parameter. This method should call three private methods DetermineGenderFit( ... ), DetermineRomanceFit( ... ) and DetermineFinanceFit( ... ), that will be used to return intermediate results for each of the three factors. It should multiply the three intermediate numbers together to get and return the final FitValue.
- double DetermineGenderFit(DateProfile partner) returns either a 0 or 1 depending on the gender compatibility of the calling object and the passed parameter object. You have to compare gender compatibility completely: i.e., there must be mutual consent on this one!
- double DetermineRomanceFit(DateProfile partner) returns a number from 0.0 to 1.0 depending on the romance compatibility of the calling object and the passed parameter object. The romance numbers should be highest (1.0) if the two values are equal (both 3, both 5, both 7) and lowest (perhaps a small non-zero value like .1) if their difference is 9.
- double DetermineFinanceFit(DateProfile partner) returns a number from 0.0 to 1.0 depending on the finance compatibility of the calling object and the passed parameter object. The finance numbers should be highest (1.0) if the two values are equal (both 3, both 5, both 7) and lowest (perhaps a small non-zero value like .1) if their difference is 9.
http://etudes-ng.fhda.edu/access/con...a_Ass7_pic.jpg
Make sure all mutators, constructors and other methods that affect private data adequately test for illegal values and, if possible, return a boolean that reports the results of this test..
Seems like a pretty well predigested assignment, you shouldn't have any trouble implementing that.
Even if you're braindead and can't think much for yourself you should find it pretty easy to do by just following the instructions to the letter, no independent thinking required.
Even if you're braindead and can't think much for yourself you should find it pretty easy to do by just following the instructions to the letter, no independent thinking required.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
Similar Threads
- help writing pseudocode, PLEASE!!!! (C++)
- VB cash register needed (VB.NET)
- I need a Pseudocode or advice here,Please help!! (C++)
- I need advices for the Pseudocode (JavaScript / DHTML / AJAX)
Other Threads in the C++ Forum
- Previous Thread: Windows api
- Next Thread: different versions of c++
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






