Hello!!
First of all, I am not asking you guys to do my homework for me but i am stuck at arithmetics so I would appreciate any guidance.
We are asked to design a rent calculator for Shoreline and Wavecrest communities. below are the specifications:
- Shoreline adds $140
- Fireplace adds $27
- Smoking subtracts $11
I wrote the code for these basic features but I am stuck on how to add fireplace to Shoreline price or subtract smoking. I can write a statement for each operation but our teacher wants the computer to do all the calculations. He says the fewer, the better.
here's what i've got so far and I would appreciate any hints.
Code:Private Sub btnRent_Click(sender As Object, e As EventArgs) Handles btnRent.Click If cboBuilding.Text = "Shoreline" Then lblDisplay.Text = txtBaseRent.Text + 140 End If If chkFireplace.Checked = True Then lblDisplay.Text = txtBaseRent.Text + 27 End If If chkNonSmoking.Checked = True Then lblDisplay.Text = txtBaseRent.Text - 11 End If End Sub
many thanks in advance!!!




Reply With Quote
