Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PRIOR CODE THAT CAN BE USED TEMPLATE You are asked to recreate the following form. Users will be able to enter first name, last name

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

PRIOR CODE THAT CAN BE USED TEMPLATE

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

You are asked to recreate the following form. Users will be able to enter first name, last name and select multiple houses and condominiums based on the list. See the screen shot below: X Property for Rent Buyer's Information First Name: Type of Property O Condominium . House Last Name: Condominium Without amenities House Detached Add to List Reset . Beds and Baths # of Bedrooms 1 Room 2 Rooms 3 Rooms 4 Rooms View List #of Baths 1 1.5 2 25 Exit Clear List List of Properties (not form object's properties) Your Rent class will also have to change to (Refer to List Of Objects' Demo project) : Include a list of properties (List ) o Create a field and property for list of properties or use automatic property to create list of properties. Create a default constructor if you don't have one. My solution has one already. (We will use default constructor only as it will create a list once and it can be used during the entire run) It initializes the list, Buyer and Property. Add new methods called AddProperty() to allow more properties to be added to the list. Overload this method so there is one version for each type of property (house and condo). o Create a new property (I mean an object) and add it to the list Your ToString() method will have to change to incorporate processing the list using a loop, rather than just one property. Clear List Create a method in your Rent class called 'ClearList (or anything you wish). This method should clear all properties from the wish list, and will need to be called from the Clear List button. Buttons Add to List button adds a new property to the wish list based on the selections on the form. Rename Buy to Add to List. Make sure you do the changes in the form code too. Reset works the same way as Clear button did in Assignment 1. Clear List clears all properties from the list. View List should show the summary of the properties chosen in a Message Box. So, you can delete the label (in assignment 1) from the Form. Below is the output's screen shot with one property: Formu Form1 ); Property for Rent Buyer's Information First Name: Amet Type of Property Condominium X Wish List House Last Name: Braich Condominium Without amenities House Detached Thank you Amrit Braich Your wish list has 1 property You have rented House/Detached with 4 bedrooms) and 2 bathrooms for the monthly rent of $2,350,00 Beds and Baths Add To List Reset OK # of Bedrooms O 1 Room O 2 Rooms #of Baths 0 1 O 1.5 View List Ex O 3 Rooms 02 Ln: 31 Ch: 31 SP O 4 Rooms O 25 Clear List Below is the output's screen shot with more properties: Formu Form Wish List Property for Rent Buyer's Information First Name: Amit Type of Property O Condominium House Last Name: Braich Condominium With amenities House Town House Thank you Amrit Braich Your wish list has 4 properties You have rented House/Detached with 4 bedroom(s) and 2 bathroom(s) for the monthly rent of $2,350.00 You have rented HouseTown House) with 2 bedrooms and 1 bathroom(s) for the monthly rent of $1,175.00 You have rented Condominium without amenities) with 2 bedroom(s) and 1 bathrooms for the monthly rent of $1,275.00 You have rented Condominium with amenities) with 2 bedrooms) and 1.5 bathrooms for the monthly rent of $1,462.50 Beds and Baths Add To List Reset # of Bedrooms O 1 Room #of Baths 0 1 O 2 Rooms 15 View List Exit 3 Room 4 Room 2 25 OK Clear List m Below is the output's screen shot when 'ClearList button is clicked: Property for Rent Buyer's Information Wish List x First Name: Amrit House Thank you Amrit Braich Your wish list has 0 property Last Name: Braich Town House OK Beds and Baths Add To List Reset # of Bedrooms #of Baths 1 Room House Solution Explorer Ix Search Solution Explorer (Ctrl+; . Solution 'Lab4-RentProperty-Wit C# Lab4-RentProperty-WithCla Properties - References App.config 3 Form1.cs Form1.Designer.cs Form1.resx C# Program.cs C# Property Classes Properties -- References c# Buyer.cs C# Condominium.cs C# House.cs C# Property.cs C# Rent.cs > Rent.cs X Form1.cs (Design) C# PropertyClasses Customer 9 10 11 Properties PropertyClasses. Rent 4 references public class Rent { //Aggregation 4 references public Buyer Customer { get; set; } 4 references public Property MyProperty { get; set; } 12 13 14 15 16 17 18 19 20 21 //default constructor O references public Rent() { Customer = new Buyer(); MyProperty = new Property(); } // constructor version for house 1 reference public Rent(string fName, string 1Name, string type, int beds, double baths) { Customer = new Buyer (fName, IName); MyProperty = new House(type, beds, baths); //polymorphism } 22 23 24 25 26 27 28 1 reference 29 30 31 32 33 34 //constructor version for condominium public Rent(string fName, string IName, int beds, double baths, bool amenities) { Customer = new Buyer (fName, IName); MyProperty = new Condominium(beds, baths, amenities); //polymorphism } 35 36 37 38 5 references public override string ToString() { return Customer.ToString() + MyProperty.ToString(); nor Property.cs* + x Form1.cs [Design] Properties C# PropertyClasses Property Classes.Property - Property(int beds, double baths) 5 references 9 public class Property 10 { 4 references 11 public int Numof Bedrooms { get; set; } 4 references 12 public double NumOfBathrooms { get; set; } 13 private const int BEDPRICE = 300; 14 private const int BATHPRICE = 75; 6 references 15 public double Cost { get; set; } 4 references 16 public string Type { get; set; } 17? 2 references 18 public Property(int beds, double baths) 19 { 20 NumOf Bedrooms = beds; 21 NumOfBathrooms = baths; 22 } 1 reference 23 public Property() 24 { 25 NumOfBedrooms = 1; 26 NumofBathrooms = 1; 27 } 28 1 reference 29 public double CalculateRent() 30 { 31 return Cost + (NumofBedrooms BEDPRICE) + (NumOfBathrooms * BATHPRICE); 32 } 33 5 references 34 public override string ToString() 35 { 36 return " You have rented + this.GetType().Name + "("+ Type + ")" + - House(string type, int beds, doubl House.cs* + x Property.cs* Form1.cs (Design) Properties C# PropertyClasses PropertyClasses.House 7 namespace PropertyClasses 8 { 1 reference 9 public class House : Property 10 { 2 references 11 public string TypeOfHouse { get; set; } 12 private const double TOWN_COST = 500; 13 private const double SEMI_COST = 700; 14 private const double DETACHED_COST = 1000; 1 reference 15 public House(string type, int beds, double baths) : base(beds, baths) 16 { 17 TypeOfHouse = type; 18 Type 19 switch (TypeOfHouse) 20 { 21 case "Town House": 22 Cost = TOWN_COST; 23 break; 24 case "Semi-Detached": 25 Cost - SEMI_COST; 26 break; 27 default: 28 Cost - DETACHED_COST; 29 break; 30 } 31 32 } 33 } = type; Condominium.cs* + x House.cs* Property.cs* Form1.cs (Design) Properties C# Property Classes PropertyClasses.Condominium 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace PropertyClasses 8 { 1 reference 9 public class Condominium : Property 10 { 3 references 11 private bool Amenities { get; set; } 12 private const double AMENITIES = 150; 13 private const double CONDOCOST = 600; 1 reference 14 public Condominium(int beds, double baths, bool amenities) 15 : base(beds, baths) 16 { 17 Amenities - amenities; 18 19 if (Amenities) 20 { 21 Cost = CONDOCOST + AMENITIES; 22 Type = "with amenities"; 23 } 24 if (!Amenities) 25 { 26 Cost = CONDOCOST; 27 Type "without amenities"; 28 } 29 30 } 31 } Form1.cs (Design) 7 - Buyer.cs* + x Condominium.cs* House.cs* Property.cs* C# Property Classes Property Classes.Buyer namespace PropertyClasses 8 { 3 references 9 public class Buyer 10 { 11 private string strFirstName; 12 private string strLastName; 13 2 references 14 public string FirstName 15 { 16 get 17 {return strFirstName;} 18 set 19 { 20 if (value != null) 21 strFirstName - value; 22 } 23 } 24 2 references 25 public string Last Name 26 { 27 28 {return strLastName;} 29 set 30 { 31 if(value != null) strLastName = value; 33 } } get 32 34 35 36 37 38 1 reference public Buyer() { } 20 Form1.cs + x Buyer.cs* Condominium.cs* House.cs* Property.cs* Form1.cs [Design] C# Lab4-RentProperty-With Classes Lab4_RentProperty_WithClasses.Form1 rent 12 namespace Lab4_RentProperty_withclasses 13 { 2 references 14 public partial class Form1 : Form 15 { 16 Rent rent; 1 reference 17 public Form1() 18 { 19 InitializeComponent(); //few properties change at run time 21 this.AcceptButton = btnBuy; 22 radHouse. Checked = true; 23 cmbHouse. Items.Add("Detached"); 24 cmbHouse.Items.Add("Semi-Detached"); 25 cmbHouse.Items.Add("Town House"); 26 27 //first challange 28 cmbCondo. SelectedIndex = 0; 29 cmbHouse. SelectedIndex = 0; 30 } 31 32 1 reference 33 private void btnBuy_Click(object sender, EventArgs e) 34 { 35 //make sure all text boxes are filled 36 //if not, error message and return 37 if (txtFName.Text == || txtLName. Text string. Empty) 38 { 39 MessageBox.Show("Please enter first and last name", "Data Missing"); 40 txtFName. Focus(); 41 return; 42 Condominium.cs* Properties Form1.cs + x Buyer.cs* C# Lab4-RentProperty-WithClasses House.cs* Property.cs* Lab4_RentProperty_With Classes.Form1 Form1.cs [Design] rent int beds = 0; double baths; 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 //for number of beds if (radiroom.Checked) beds = 1; else if (rad2rooms. Checked) beds = 2; else if (rad3rooms. Checked) beds = 3; else beds = 4; //for baths if (rad1Bath.Checked) baths = 1; else if (radiAndHalfBath.Checked) baths = 1.5; else if (radandhalfbath. Checked) baths = 2.5; else baths = 2; 61 62 63 64 65 if (radHouse. Checked) { i/create rent object with house parameters rent = new Rent(txtFName.Text, txtLName.Text, cmbHouse. Selected Item.ToString(),beds, baths); //rent. MyProperty Type = cmbHouse. SelectedItem.ToString(); 67 68 69 70 71 72 73 74 75 76 77 78 else // if (radCondo.Checked) { // create rent object with condo parameters 1/Convert.ToBoolean casts 0 to false and 1 to true rent = new Rent(txtFName.Text, txtLName.Text, beds, baths, Convert.ToBoolean(cmbCondo. SelectedIndex)); // rent. MyProperty Type = cmbCondo. SelectedItem.ToString(); - Form1.cs + x Buyer.cs* Condominium.cs* House.cs* Property.cs* Form1.cs (Design) Properties C# Lab4-RentProperty-With Classes Lab4_RentProperty_With Classes.Form1 rent else // if(radCondo.Checked) { //create rent object with condo parameters 1/Convert.ToBoolean casts to false and i to true 76 rent = new Rent(txtFName.Text, txtLName.Text, beds, baths, Convert.ToBoolean(cmbCondo. Se // rent. MyProperty Type cmbCondo. SelectedItem.ToString(); } 72 73 74 75 77 78 80 81 1blDisplayRent. Text btnclear. Focus(); + rent.ToString() + "!!"; } 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 1 reference private void btnClear_Click(object sender, EventArgs e) { txtFName.Text = string. Empty; txtLName.Text = string. Empty; radiroom.Checked = true; rad1Bath.Checked = true; radHouse. Checked = true; radCondo.Checked = false; cmbCondo. SelectedIndex = 0; 1blDisplayRent.Text = string. Empty; cmbCondo. SelectedIndex = 0; cmbHouse. SelectedIndex = 0; txtFName. Focus(); } 1 reference 99 100 101 102 103 private void btnExit_Click(object sender, EventArgs e) { Application.Exit(); } 165 Form1.cs + x Buyer.cs* Condominium.cs* House.cs* Property.cs* Form1.cs [Des C# Lab4-RentProperty-WithClasses Lab4_RentProperty_With Classes.Form1 1 reference private void radCondo_CheckedChanged(object sender, EventArgs e) { cmbCondo.Enabled = radroom.Checked = rad1Bath.Checked = true; cmbHouse.Enabled = false; rad2andhalfbath.Enabled = false; rad2bath.Enabled = false; rad3rooms.Enabled = false; rad4rooms.Enabled = false; } 104 105 106 107 108 109 110 111 112 113 1 reference 114 115 116 117 118 119 120 121 122 123 124 125 private void radHouse_CheckedChanged(object sender, EventArgs e) { cmbCondo.Enabled = false; cmbHouse.Enabled = true; rad2andhalfbath.Enabled = true; rad2bath.Enabled = true; rad3rooms.Enabled = true; rad4rooms.Enabled = true; } You are asked to recreate the following form. Users will be able to enter first name, last name and select multiple houses and condominiums based on the list. See the screen shot below: X Property for Rent Buyer's Information First Name: Type of Property O Condominium . House Last Name: Condominium Without amenities House Detached Add to List Reset . Beds and Baths # of Bedrooms 1 Room 2 Rooms 3 Rooms 4 Rooms View List #of Baths 1 1.5 2 25 Exit Clear List List of Properties (not form object's properties) Your Rent class will also have to change to (Refer to List Of Objects' Demo project) : Include a list of properties (List ) o Create a field and property for list of properties or use automatic property to create list of properties. Create a default constructor if you don't have one. My solution has one already. (We will use default constructor only as it will create a list once and it can be used during the entire run) It initializes the list, Buyer and Property. Add new methods called AddProperty() to allow more properties to be added to the list. Overload this method so there is one version for each type of property (house and condo). o Create a new property (I mean an object) and add it to the list Your ToString() method will have to change to incorporate processing the list using a loop, rather than just one property. Clear List Create a method in your Rent class called 'ClearList (or anything you wish). This method should clear all properties from the wish list, and will need to be called from the Clear List button. Buttons Add to List button adds a new property to the wish list based on the selections on the form. Rename Buy to Add to List. Make sure you do the changes in the form code too. Reset works the same way as Clear button did in Assignment 1. Clear List clears all properties from the list. View List should show the summary of the properties chosen in a Message Box. So, you can delete the label (in assignment 1) from the Form. Below is the output's screen shot with one property: Formu Form1 ); Property for Rent Buyer's Information First Name: Amet Type of Property Condominium X Wish List House Last Name: Braich Condominium Without amenities House Detached Thank you Amrit Braich Your wish list has 1 property You have rented House/Detached with 4 bedrooms) and 2 bathrooms for the monthly rent of $2,350,00 Beds and Baths Add To List Reset OK # of Bedrooms O 1 Room O 2 Rooms #of Baths 0 1 O 1.5 View List Ex O 3 Rooms 02 Ln: 31 Ch: 31 SP O 4 Rooms O 25 Clear List Below is the output's screen shot with more properties: Formu Form Wish List Property for Rent Buyer's Information First Name: Amit Type of Property O Condominium House Last Name: Braich Condominium With amenities House Town House Thank you Amrit Braich Your wish list has 4 properties You have rented House/Detached with 4 bedroom(s) and 2 bathroom(s) for the monthly rent of $2,350.00 You have rented HouseTown House) with 2 bedrooms and 1 bathroom(s) for the monthly rent of $1,175.00 You have rented Condominium without amenities) with 2 bedroom(s) and 1 bathrooms for the monthly rent of $1,275.00 You have rented Condominium with amenities) with 2 bedrooms) and 1.5 bathrooms for the monthly rent of $1,462.50 Beds and Baths Add To List Reset # of Bedrooms O 1 Room #of Baths 0 1 O 2 Rooms 15 View List Exit 3 Room 4 Room 2 25 OK Clear List m Below is the output's screen shot when 'ClearList button is clicked: Property for Rent Buyer's Information Wish List x First Name: Amrit House Thank you Amrit Braich Your wish list has 0 property Last Name: Braich Town House OK Beds and Baths Add To List Reset # of Bedrooms #of Baths 1 Room House Solution Explorer Ix Search Solution Explorer (Ctrl+; . Solution 'Lab4-RentProperty-Wit C# Lab4-RentProperty-WithCla Properties - References App.config 3 Form1.cs Form1.Designer.cs Form1.resx C# Program.cs C# Property Classes Properties -- References c# Buyer.cs C# Condominium.cs C# House.cs C# Property.cs C# Rent.cs > Rent.cs X Form1.cs (Design) C# PropertyClasses Customer 9 10 11 Properties PropertyClasses. Rent 4 references public class Rent { //Aggregation 4 references public Buyer Customer { get; set; } 4 references public Property MyProperty { get; set; } 12 13 14 15 16 17 18 19 20 21 //default constructor O references public Rent() { Customer = new Buyer(); MyProperty = new Property(); } // constructor version for house 1 reference public Rent(string fName, string 1Name, string type, int beds, double baths) { Customer = new Buyer (fName, IName); MyProperty = new House(type, beds, baths); //polymorphism } 22 23 24 25 26 27 28 1 reference 29 30 31 32 33 34 //constructor version for condominium public Rent(string fName, string IName, int beds, double baths, bool amenities) { Customer = new Buyer (fName, IName); MyProperty = new Condominium(beds, baths, amenities); //polymorphism } 35 36 37 38 5 references public override string ToString() { return Customer.ToString() + MyProperty.ToString(); nor Property.cs* + x Form1.cs [Design] Properties C# PropertyClasses Property Classes.Property - Property(int beds, double baths) 5 references 9 public class Property 10 { 4 references 11 public int Numof Bedrooms { get; set; } 4 references 12 public double NumOfBathrooms { get; set; } 13 private const int BEDPRICE = 300; 14 private const int BATHPRICE = 75; 6 references 15 public double Cost { get; set; } 4 references 16 public string Type { get; set; } 17? 2 references 18 public Property(int beds, double baths) 19 { 20 NumOf Bedrooms = beds; 21 NumOfBathrooms = baths; 22 } 1 reference 23 public Property() 24 { 25 NumOfBedrooms = 1; 26 NumofBathrooms = 1; 27 } 28 1 reference 29 public double CalculateRent() 30 { 31 return Cost + (NumofBedrooms BEDPRICE) + (NumOfBathrooms * BATHPRICE); 32 } 33 5 references 34 public override string ToString() 35 { 36 return " You have rented + this.GetType().Name + "("+ Type + ")" + - House(string type, int beds, doubl House.cs* + x Property.cs* Form1.cs (Design) Properties C# PropertyClasses PropertyClasses.House 7 namespace PropertyClasses 8 { 1 reference 9 public class House : Property 10 { 2 references 11 public string TypeOfHouse { get; set; } 12 private const double TOWN_COST = 500; 13 private const double SEMI_COST = 700; 14 private const double DETACHED_COST = 1000; 1 reference 15 public House(string type, int beds, double baths) : base(beds, baths) 16 { 17 TypeOfHouse = type; 18 Type 19 switch (TypeOfHouse) 20 { 21 case "Town House": 22 Cost = TOWN_COST; 23 break; 24 case "Semi-Detached": 25 Cost - SEMI_COST; 26 break; 27 default: 28 Cost - DETACHED_COST; 29 break; 30 } 31 32 } 33 } = type; Condominium.cs* + x House.cs* Property.cs* Form1.cs (Design) Properties C# Property Classes PropertyClasses.Condominium 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 7 namespace PropertyClasses 8 { 1 reference 9 public class Condominium : Property 10 { 3 references 11 private bool Amenities { get; set; } 12 private const double AMENITIES = 150; 13 private const double CONDOCOST = 600; 1 reference 14 public Condominium(int beds, double baths, bool amenities) 15 : base(beds, baths) 16 { 17 Amenities - amenities; 18 19 if (Amenities) 20 { 21 Cost = CONDOCOST + AMENITIES; 22 Type = "with amenities"; 23 } 24 if (!Amenities) 25 { 26 Cost = CONDOCOST; 27 Type "without amenities"; 28 } 29 30 } 31 } Form1.cs (Design) 7 - Buyer.cs* + x Condominium.cs* House.cs* Property.cs* C# Property Classes Property Classes.Buyer namespace PropertyClasses 8 { 3 references 9 public class Buyer 10 { 11 private string strFirstName; 12 private string strLastName; 13 2 references 14 public string FirstName 15 { 16 get 17 {return strFirstName;} 18 set 19 { 20 if (value != null) 21 strFirstName - value; 22 } 23 } 24 2 references 25 public string Last Name 26 { 27 28 {return strLastName;} 29 set 30 { 31 if(value != null) strLastName = value; 33 } } get 32 34 35 36 37 38 1 reference public Buyer() { } 20 Form1.cs + x Buyer.cs* Condominium.cs* House.cs* Property.cs* Form1.cs [Design] C# Lab4-RentProperty-With Classes Lab4_RentProperty_WithClasses.Form1 rent 12 namespace Lab4_RentProperty_withclasses 13 { 2 references 14 public partial class Form1 : Form 15 { 16 Rent rent; 1 reference 17 public Form1() 18 { 19 InitializeComponent(); //few properties change at run time 21 this.AcceptButton = btnBuy; 22 radHouse. Checked = true; 23 cmbHouse. Items.Add("Detached"); 24 cmbHouse.Items.Add("Semi-Detached"); 25 cmbHouse.Items.Add("Town House"); 26 27 //first challange 28 cmbCondo. SelectedIndex = 0; 29 cmbHouse. SelectedIndex = 0; 30 } 31 32 1 reference 33 private void btnBuy_Click(object sender, EventArgs e) 34 { 35 //make sure all text boxes are filled 36 //if not, error message and return 37 if (txtFName.Text == || txtLName. Text string. Empty) 38 { 39 MessageBox.Show("Please enter first and last name", "Data Missing"); 40 txtFName. Focus(); 41 return; 42 Condominium.cs* Properties Form1.cs + x Buyer.cs* C# Lab4-RentProperty-WithClasses House.cs* Property.cs* Lab4_RentProperty_With Classes.Form1 Form1.cs [Design] rent int beds = 0; double baths; 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 //for number of beds if (radiroom.Checked) beds = 1; else if (rad2rooms. Checked) beds = 2; else if (rad3rooms. Checked) beds = 3; else beds = 4; //for baths if (rad1Bath.Checked) baths = 1; else if (radiAndHalfBath.Checked) baths = 1.5; else if (radandhalfbath. Checked) baths = 2.5; else baths = 2; 61 62 63 64 65 if (radHouse. Checked) { i/create rent object with house parameters rent = new Rent(txtFName.Text, txtLName.Text, cmbHouse. Selected Item.ToString(),beds, baths); //rent. MyProperty Type = cmbHouse. SelectedItem.ToString(); 67 68 69 70 71 72 73 74 75 76 77 78 else // if (radCondo.Checked) { // create rent object with condo parameters 1/Convert.ToBoolean casts 0 to false and 1 to true rent = new Rent(txtFName.Text, txtLName.Text, beds, baths, Convert.ToBoolean(cmbCondo. SelectedIndex)); // rent. MyProperty Type = cmbCondo. SelectedItem.ToString(); - Form1.cs + x Buyer.cs* Condominium.cs* House.cs* Property.cs* Form1.cs (Design) Properties C# Lab4-RentProperty-With Classes Lab4_RentProperty_With Classes.Form1 rent else // if(radCondo.Checked) { //create rent object with condo parameters 1/Convert.ToBoolean casts to false and i to true 76 rent = new Rent(txtFName.Text, txtLName.Text, beds, baths, Convert.ToBoolean(cmbCondo. Se // rent. MyProperty Type cmbCondo. SelectedItem.ToString(); } 72 73 74 75 77 78 80 81 1blDisplayRent. Text btnclear. Focus(); + rent.ToString() + "!!"; } 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 1 reference private void btnClear_Click(object sender, EventArgs e) { txtFName.Text = string. Empty; txtLName.Text = string. Empty; radiroom.Checked = true; rad1Bath.Checked = true; radHouse. Checked = true; radCondo.Checked = false; cmbCondo. SelectedIndex = 0; 1blDisplayRent.Text = string. Empty; cmbCondo. SelectedIndex = 0; cmbHouse. SelectedIndex = 0; txtFName. Focus(); } 1 reference 99 100 101 102 103 private void btnExit_Click(object sender, EventArgs e) { Application.Exit(); } 165 Form1.cs + x Buyer.cs* Condominium.cs* House.cs* Property.cs* Form1.cs [Des C# Lab4-RentProperty-WithClasses Lab4_RentProperty_With Classes.Form1 1 reference private void radCondo_CheckedChanged(object sender, EventArgs e) { cmbCondo.Enabled = radroom.Checked = rad1Bath.Checked = true; cmbHouse.Enabled = false; rad2andhalfbath.Enabled = false; rad2bath.Enabled = false; rad3rooms.Enabled = false; rad4rooms.Enabled = false; } 104 105 106 107 108 109 110 111 112 113 1 reference 114 115 116 117 118 119 120 121 122 123 124 125 private void radHouse_CheckedChanged(object sender, EventArgs e) { cmbCondo.Enabled = false; cmbHouse.Enabled = true; rad2andhalfbath.Enabled = true; rad2bath.Enabled = true; rad3rooms.Enabled = true; rad4rooms.Enabled = true; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

Students also viewed these Databases questions