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

Please include all source code in the answer thank you! Create a housing applica

ID: 3571870 • Letter: P

Question

Please include all source code in the answer thank you!

Create a housing application for a rental property manager. This application includes three classes. Housing class is the base class and contains address, year built, and builder name data fields. It also contains a virtual method which returns yearly rental income. The MultiUnit class is a derived class and contains the number of units. The SingleFamily class is derived class that contains square footage of the house and also if the house has a garage. Create class libraries (.DLL files) for three classes. Create a Windows forms application to test your design.

Please include all source code in the answer thank you!

Explanation / Answer

#ifndef PROPERTY_H

#define PROPERTY_H

#include <iostream>

using namespace std;

class Property

{

      //member variables:

      protected:

            int PropertyNumber; //a unique 7 digit number to reference the property

          string Address; //street address

          string City, State, ZIPCode;

            int Stories; //number of stories

          int Condition ;// condition of the property (1 - Excellent, 2 - Fair, 3 Poor)

          int YearBuilt; //the year the property was built

          double MarketValue; // the current market value of the property ($)

          int type; //1 for residential, 2 for commercial. No setter needed

      //member functions:

      public:

            //Constructors Optional

            Property(int pN, string add, string cty, string st, string z,

                  int str, int c, int y, double mv, int t)

            {

                  PropertyNumber = pN;

                  Address = add;

                  City = cty;

                  State = st;

                  ZIPCode = z;

                  Stories = str; //number of stories

                  Condition = c;// condition of the property (1 - Excellent, 2 - Fair, 3 Poor)

                  YearBuilt = y; //the year the property was built

                  MarketValue = mv; // the current market value of the property ($)

                  type = t; //1 for residential, 2 for commercial. No setter needed

            }

     

     

      //getters and setters for member variables

            int getPropertyNumber(){return PropertyNumber;} //a unique 7 digit number to reference the property

          string getAddress(){return Address;} //street address

         string getCity(){return City;}

            string getState(){return State;}

            string getZIPCode(){return ZIPCode;}

            int getStories(){return Stories;} //number of stories

int getCondition(){return Condition;}// condition of the property (1 - Excellent, 2 - Fair, 3 Poor)

          int getYearBuilt(){return YearBuilt;} //the year the property was built

          double getMarketValue(){return MarketValue;} // the current market value of the property ($)

          int gettype(){return type;}

     

            virtual void print(){} // this function should be overridden by the child classes but can be implemented to avoid redundancy

            virtual double calculatePropertyTaxes() {return 0;} // this function should be overridden by the child classes for now just return

            virtual double calculateRent(){return 0;} // this function should be overridden by the Commercial class for now just return 0

};

#endif

------------------------------------------------------------ Driver I wrote:

#include <string>

#include <iostream>

#include "property.h"

#include "commercialproperty.h"

#include "residentialproperty.h"

using namespace std;

int main()

{

    int Choice,Select, PropertyNumber, YearBuilt, ZipCode, Bedrooms,Type, Stories, MaxOccupancy,

    double RentPerSquareFoot, Bathrooms

    string Style, StreetAddress, City, State,

     

      do

      {

            system("cls");

            Property.showMenu();

            cout <<"- Real Estate Program - "

                 <<" 1.Enter new listing "

                 <<" 2.Print listing "

                 <<" 3.Delete listing "

                 <<" 4.Save listing briefs to file "

                 <<"Enter Selection: ";

                

                 cin>> choice;

                 switch(choice)

                 {

                 case 1:

                      {

                           cout<< "Select 1 for Residential or 2 for Commercial ";

                           cin>> select;

                           If (select == 1);

                              cout<< "What is the style? ?";

                              cin>> style;

                             

                              cout<< "What is the Property Number? ";

                              cin>> PropertyNumber;

                      

                             

                              cout<< "What is the Street Address? ";

                              cin.clear();

                              fflush(stdin);

                              getline(cin, StreetAddress);

                             

                              cout<< "What City is it in? "

                              cin.clear();

                              fflush(stdin);

                              getline(cin, City);

                              

                              cout<< "What state is it in? ";

                              cin.clear();

                              fflush(stdin);

                              getline(cin, State);

                              cout<< "What is the zip code of the property ?";

                              cin>>ZipCode;

                             

                              cout<< "How many Bedrooms does the property have? ";

                              cin>> Bedrooms;

                              

                              cout<< "How many bathrooms does the property have? ?";

                              cin>>Bathrooms;

                             

                              cout<< "How many stories is the property? ?";

                              cin>> Stories;

                             

                              cout<< "What condition is the property in? " ;

                              cin>> Condition;

                             

                              cout>> "What year was the property built? "

                              cin<< YearBuilt;

                             

                              cout<< "What is the Market Value of the property? ";

                              cin>> MarketValue;

                             

                             Type=1.

                             

                       

                      //blah

                 break;

                 case 2://blah

                 break;

                case 3://blah

                 break;

                 case 4://blah

                 break;

                 default:

                 break;

                

                

      }

     

      while(cont == 'y' || cont == 'Y');

     

      view1.setMessages(myBlog.getMessages()); //copying the owner vector into the veiwer vector

      do

      {

            system("cls");

            view1.showMenu();

            cout <<"Enter (C) to continue or (Q) to quit. ";

            cin >> cont;

      }

      while(cont == 'y' || cont == 'Y');

      system("pause");

      return 0;

}