Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code in C# The application should give the customer the ability to select the type of house, number of beds and baths in a house
Code in C#
The application should give the customer the ability to select the type of house, number of beds and baths in a house to rent. Amrit Braich 12345 House for Rent Buyer's Infomation Buy First Name: Kate Type of Property O Detached Semi-Detached O Town Last Name: Eyles Clear Use the PropertyClasses Class Library from your previous lab as an integral part of this project. You should add a new class. Call it Property. Think about the attributes/ properties and methods that goes in Property class. You may need to make some changes to your Rent class. Exit Beds and Baths Thank you Kate Eyles You have rented a Town house with 2 bedrooms) and 1.5 bathr for the monthly rent of $1,212.50 # of Bedrooms 1 Room 2 Rooms O 3 Rooms #of Baths 0 1 1.5 O2 O 25 4 Rooms You can also download and open the starting point for this project from Week 5 in BlackBoard. It includes class library which contains a Buyer and Rent class as of Lab 4. Remember we'll be adding more to this application. Use Constants for fixed values (bed price, bath price, town base price, semi-detached base price and detached base price). Use appropriate data types. Each bedroom costs $300. (No consideration for room size) - Each full bathroom costs $75. However, cost cuts to half if you choose half bath Base Price for town house, Semi-detached and Detached is $500, $700 and $1000 respectively. The Form should calculate the rent based on their selections. Once the customer has finished making their selections, a final summary of the house with type, total rent and customer full name should display in the label in the bottom right of the form called blDisplayRent. Rename the form title with your student name. Follow a naming convention for all controls, variables, and constants. Disable 4 rooms radio button if customer wants a town house. Create only one object (Rent) in Form1.cs. 7 8 9 10 11 300; namespace PropertyClasses { 3 references public class Rent { public const double REGULAR_ROOM_PRICE = 4 references public int NumofBedrooms { get; set; } 3 references public double Cost { get; set; } 2 references public Buyer Buyer { get; set; } 12 13 14 15 16 17 18 19 20 O references public Rent(Buyer buyer, int beds) { Buyer = buyer; NumOf Bedrooms beds; Cost = REGULAR_ROOM_PRICE; } 21 22 23 24 25 26 27 28 O references public Rent() { NumOf Bedrooms = 1; Cost = REGULAR_ROOM_PRICE; } 29 30 1 reference public double CalculateRent() { return Numof Bedrooms } 31 Cost; 32 33 2 references 34 35 36 37 38 39 40 41 public override string ToString() { return Buyer.ToString() + " You have rented" + NumOf Bedrooms + "for the monthly rent of " + CalculateRent(); bedrooms 7 8 9 10 11 12 13 namespace Propertyclasses { 3 references public class Buyer { private string firstName; private string lastName; 14 15 16 17 18 19 20 21 22 23 24 25 2 references public string FirstName { get { return firstName; } set { firstName = value; } } - 26 27 28 29 30 31 32 33 34 35 36 37 2 references public string LastName { get { return lastName; } set { lastName = value; } } E 38 39 40 41 42 43 O references public Buyer(string fName, string lName) { FirstName = fName; LastName = lName; } 0- 2 references public override String ToString() { return "Thank you + FirstName + } 44 45 46 47 48 49 50 + LastName; } The application should give the customer the ability to select the type of house, number of beds and baths in a house to rent. Amrit Braich 12345 House for Rent Buyer's Infomation Buy First Name: Kate Type of Property O Detached Semi-Detached O Town Last Name: Eyles Clear Use the PropertyClasses Class Library from your previous lab as an integral part of this project. You should add a new class. Call it Property. Think about the attributes/ properties and methods that goes in Property class. You may need to make some changes to your Rent class. Exit Beds and Baths Thank you Kate Eyles You have rented a Town house with 2 bedrooms) and 1.5 bathr for the monthly rent of $1,212.50 # of Bedrooms 1 Room 2 Rooms O 3 Rooms #of Baths 0 1 1.5 O2 O 25 4 Rooms You can also download and open the starting point for this project from Week 5 in BlackBoard. It includes class library which contains a Buyer and Rent class as of Lab 4. Remember we'll be adding more to this application. Use Constants for fixed values (bed price, bath price, town base price, semi-detached base price and detached base price). Use appropriate data types. Each bedroom costs $300. (No consideration for room size) - Each full bathroom costs $75. However, cost cuts to half if you choose half bath Base Price for town house, Semi-detached and Detached is $500, $700 and $1000 respectively. The Form should calculate the rent based on their selections. Once the customer has finished making their selections, a final summary of the house with type, total rent and customer full name should display in the label in the bottom right of the form called blDisplayRent. Rename the form title with your student name. Follow a naming convention for all controls, variables, and constants. Disable 4 rooms radio button if customer wants a town house. Create only one object (Rent) in Form1.cs. 7 8 9 10 11 300; namespace PropertyClasses { 3 references public class Rent { public const double REGULAR_ROOM_PRICE = 4 references public int NumofBedrooms { get; set; } 3 references public double Cost { get; set; } 2 references public Buyer Buyer { get; set; } 12 13 14 15 16 17 18 19 20 O references public Rent(Buyer buyer, int beds) { Buyer = buyer; NumOf Bedrooms beds; Cost = REGULAR_ROOM_PRICE; } 21 22 23 24 25 26 27 28 O references public Rent() { NumOf Bedrooms = 1; Cost = REGULAR_ROOM_PRICE; } 29 30 1 reference public double CalculateRent() { return Numof Bedrooms } 31 Cost; 32 33 2 references 34 35 36 37 38 39 40 41 public override string ToString() { return Buyer.ToString() + " You have rented" + NumOf Bedrooms + "for the monthly rent of " + CalculateRent(); bedrooms 7 8 9 10 11 12 13 namespace Propertyclasses { 3 references public class Buyer { private string firstName; private string lastName; 14 15 16 17 18 19 20 21 22 23 24 25 2 references public string FirstName { get { return firstName; } set { firstName = value; } } - 26 27 28 29 30 31 32 33 34 35 36 37 2 references public string LastName { get { return lastName; } set { lastName = value; } } E 38 39 40 41 42 43 O references public Buyer(string fName, string lName) { FirstName = fName; LastName = lName; } 0- 2 references public override String ToString() { return "Thank you + FirstName + } 44 45 46 47 48 49 50 + LastName; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started