Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

IN C++, PLEASE HELP ME WRITE THIS PROGRAM: write a complete program with the fol

ID: 3829578 • Letter: I

Question

IN C++, PLEASE HELP ME WRITE THIS PROGRAM:

write a complete program with the following functions:

Print(houseType) - displays house information in both monitor and output file

readData(..) - reads house info from a data file

getData(..) - gets a house information from keyboard

compareHouses(..) - compares two houses (style and price) and print info accordingly.

Write a test program to test your functions.

Skeleton Solution:

struct houseType

{

            string style;

            int numOfBedrooms;

            int numOfBathrooms;

            int numOfCarsGarage;

            int yearBuilt;

            int finishedSquareFootage;

            double price;

            double tax;

};

void print(houseType);

void readData(houseType[]);

void getData(houseType&);

bool compareHouses(houseType, houseType);

void main()

{

……

}

void print(houseType ..)    {       ……           }

void readData(houseType[] …) {      ….       }

void getData(houseType& …) {       ….       }

bool compareHouses(houseType .., houseType ..) {              …        }

Explanation / Answer

int numOfBedrooms;

            int numOfBathrooms;

            int numOfCarsGarage;

            int yearBuilt;

            int finishedSquareFootage;

            double price;

            double tax;