Question: Consider the declaration of the struct houseType given below: struct houseType { string style; int numOfBedrooms; int numOfBathrooms; int numOfCarsGarage; int yearBuilt; int finishedSquareFootage; double
Consider the declaration of the struct houseType given below:
struct houseType
string style;
int numOfBedrooms;
int numOfBathrooms;
int numOfCarsGarage;
int yearBuilt;
int finishedSquareFootage;
double price;
double tax;
;
Using houseType using structure, write a complete program with the following functions you can include or exclude functions of your choice:
void printhouseType; display output on monitor
void printhouseType ofstream&; display in an output file
void readDatahouseType&; read one record of data from keyboard
void readDatahouseType int; read a set of data from data file
bool compareHouseshouseType houseType;
Compare two houses if at least finished square footages and prices are same then both houses are identical otherwise they are different
Write a test program to test your functions for the following data file:
TwoStory
SingleStory
SplitCondo
SingleStory
SingleStory
TwoStory
SplitCondo
Rewrite the above program using Class OOP and test your program. Remember, output must be the same for both programs. In C
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
