Create a class named RealEstate that has data members to hold the price of a house, the number of bedrooms, and the number of baths. Make a member function get_Data() that gets the RealEstate's data from the user, and throws an appropriate error message if negative values are entered for any of the data members. Add a display() function that displays the RealEstate's data. Write a main() function that instantiates a RealEstate object, allows the user to enter the RealEstates data, use an ofstream object to store the RealEstate's data in RealEstate.dat file, and close the ofstream object. Then open an ifstream object to read information from file, RealEstate.dat, and displays the information.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here