Question: PYTHON Class DateProfile Create a class called DateProfile that has the following instance attributes: .gender - a single character string, the gender of the applicant

PYTHON

PYTHON Class DateProfile Create a class called DateProfile that has the followinginstance attributes: .gender - a single character string, the gender of theapplicant ('M or 'F). .search_gender single character string, the gender of desiredpartner (M or 'F). This is not the gender of the applicant,

Class DateProfile Create a class called DateProfile that has the following instance attributes: .gender - a single character string, the gender of the applicant ('M or 'F). .search_gender single character string, the gender of desired partner (M or 'F). 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. Each object in the DateProfile class represents an applicant's profile. If the object is (M, 'F, 7, 4, "Hugh Hefner") then the applicant's name is "Hugh Hefner", he's looking for a date who is Female, with romance being somewhat important (7) and finance being less important (4) Create instended static constants for . All range limits (like MIN ROMANCE, MIN NAME_LEN, etc.). These are the limits that the mutators test for. All default values (like DEFAULT_GEND, DEFAULT_SEARCH_GEND, DEFAULT_NAME). These are used if the constructor without arguments is called or if arguments are supplied but a bad value (out-of-range) is detected. However, they are not used directly in the constructors, as we will find that there are helper methods that do the dirty work for the constructors -see below You should supply all of the following instance methods of class DateProfile (at a minimum): Accessors and Mutators for each attribute (instance member). For example: char get_gender and bool set_gender(char gdr). In addition to individual mutators, create an instance methodset-all( ), that takes all five parameters and acts like a mutator, except that it does not return a boolean. i.?., in this one, you do not have to report bad parameters back to the user, even though you would still filter them out. Also, create an instance method, set defaults), that sets all five members to their default values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!