Classes/Streams – Marketing software

Classes/Streams – Marketing software In this programming assignment, you’ll identify the number of potential customers for a business. The starter program outputs the number of potential customers in a user­entered age range given a file with people’s data. 1. Move the class Person to the separate files: person.h and person.cpp. Make sure you can still compile with separate files. 2. During file reading, the program isn’t storing the gender or yearly income of the people. Instead, the default values are being printed. Fix the program to correctly set the data read from file. The regions of the code that need to be fixed are marked with: “FIXME Also set gender and yearly income” 3. Allow the user to select the potential customer’s gender: “male”, “female”, or “any”. The program should now output only potential customers with the user­specified gender and age. Update the GetUserInput function to prompt the user and store the user’s gender selection. Also, create a function GetPeopleWithSpecificGender that returns only people with the user­specified gender. Debugging suggestion: Use a function to print main’s vector of Persons so that you can see who is in the vector after each function call. This technique may help debug the newly created function GetPeopleWithSpecificGender. 4. In addition to age and gender, allow the user to select the lower and upper range of a customer’s yearly income. Update the GetUserInput function to prompt the user and store the user’s specified range. Also, create a function GetPeopleInIncomeRange that returns only people with the user­specified yearly income. The main should now look like the following code: intmain(intargc,char*argv[]){ vectorpeople; boolhadError=false; intageLowerRange=0; intageUpperRange=0; stringgender=””; intyILowerRange=0; intyIUpperRange=0; hadError=ReadPeopleFromFile(argc,argv,people); if(hadError){ return1;//indicateserror } GetUserInput(ageLowerRange,ageUpperRange,gender,yILowerRange, yIUpperRange); people=GetPeopleInAgeRange(people,ageLowerRange,ageUpperRange); people=GetPeopleWithSpecificGender(people,gender); people=GetPeopleInIncomeRange(people,yILowerRange,yIUpperRange); cout<<“nNumberofpotentialcustomers=”<

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

The post Classes/Streams – Marketing software appeared first on Academic Heroes.

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code “Newclient”

The post Classes/Streams – Marketing software appeared first on Academic Heroes.

The post Classes/Streams – Marketing software appeared first on Academic Heroes.

 

"Is this question part of your assignment? We Can Help!"

Essay Writing Service