I need some help coding for a assignment.

I marked which one I need help the most. In parenthesis.


Requirement 1:  Make sure the form is named SercviceForm. Change the Forms Text property to “Pet Boutique Service Form”.

 Service Form.png
View in a new window

Requirement 2:  When the user selects service options and clicks on the Total button, the application displays the appropriate Total Fee amount.


 

INSTRUCTIONS:

(5 Points) Open Visual Studio and create a new Window Application Project. Name the Project Lab3. NOTE: Ensure that C# is the programming language selected.
(5 Points) Make sure the form is named ServiceForm. Change the Forms Text property to “Pet Boutique Service Form”.   Re-size the form to  Width = 400, Height = 450.
(30 Points) Setup the applications form as shown in the screen shot above. As you place each of the controls on the form, refer to the following:
Text Boxes:
ownerNameTextBox
ownerPhoneTextBox
petNameTextBox
petDOBTextBox
 

Radio Buttons:
catRadioButton
dogRadioButton

Labels:
fleaRemovalPriceLabel ($5.00)
shampooPriceLabel ($4.00)
totalFeeLabel (Total Fee:)
priceLabel (will include the total price)
(all separate from the check box labels)
[plus labels for other form controls – with default names used]
 
Group Boxes:

petOwnerGroupBox
petGroupBox
servicesGroupBox
Check Boxes:

fleaRemovalCheckBox
shampooCheckBox
Buttons:

totalButton
clearButton
quitButton

(((((4.  (35 Points) Add code to the totalButton that will do this following when the user clicks:
Create a Try and Catch block statement to store the code and trap the error if one occurs
Declare a double variable called TotalFee and intialize it to 0
Then set the value of the TotalFee variable to the appropriate value depending on the selected service check-boxes (fleaRemovalCheckBox $5, shampooCheckBox $4)
NOTE:
You will need to convert  TotalFee variable to string before assigning it to the priceLabel.
Make sure that if both FleaRemoval and Shampoo are selected, the total fee represents the total amount of $9.))))))))




 public partial class ServiceForm : Form
    {
        public ServiceForm()
        {
            InitializeComponent();
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {

        }

        private void textBox2_TextChanged(object sender, EventArgs e)
        {

        }

        private void label5_Click(object sender, EventArgs e)
        {

        }

        private void totalButton_Click(object sender, EventArgs e)
        {
            try
            {
                const double TotalFee=0;            //TotalFee Value
                double

           
        }

        private void clearButton_Click(object sender, EventArgs e)
        {
            //Clear the TextBoxes
            ownerNameTextBox.Text = "";
            ownerPhoneTextBox.Text = "";
            petNameTextBox.Text = "";
            petDOBTextBox.Text = "";
           
            // Reset the Focus();
            ownerNameTextBox.Focus();
        }

        private void quitButton_Click(object sender, EventArgs e)
        {
            //close the form.
            this.Close();
        }

        }
    }

This is what I currently have..Please Help me I looked all over for guidance, but I cant get help. The assignment is due by Sunday. I would really like if someone can help me solve the last part in the parenthesis section I selected. So i can keep note of it in the future.. Thank you
SpaceMageAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Éric MoreauSenior .Net ConsultantCommented:
why don't you try to do your homework yourself? You won't learn if you don't do them by yourself!
0
Paul MacDonaldDirector, Information SystemsCommented:
Helping people with homework (or anything that sounds like homework) is generally frowned upon here at EE.  If you have a specific question, you'll probably get an answer, but just asking for help with your assignment probably won't.
0
SpaceMageAuthor Commented:
I understand the other parts.. its just the Try and catch for me is confusing. I have been looking for helpful answers, but its really confusing to me.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

SpaceMageAuthor Commented:
Sorry... I tried it, but I cannot grasp the concept of it
0
David Johnson, CD, MVPOwnerCommented:
          try
            {
            }
            catch (Exception ex) {
                string error = "An Error Has Occurred: ";
                error += ex.Message;
                statusLabel.Text = error;
}

Open in new window

1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Fernando SotoRetiredCommented:
Try starting  with this, try-catch (C# Reference), then if you have any specific question post back here.
0
SpaceMageAuthor Commented:
Thank you I figured it out
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.