GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

20. In which region of the Earth’s atmosphere have you spent…

20. In which region of the Earth’s atmosphere have you spent most of your life?

Read Details

If not properly sealed, rodents can get into this storage ar…

If not properly sealed, rodents can get into this storage area.

Read Details

You are developing an application that allows the user to co…

You are developing an application that allows the user to complete sandwich orders. The user must first select a type and side, then enter the quantity of sandwiches and price per sandwich. Finally, the user must click the calculate button. Given the provided template, write the code to meet these requirements: The user should be able to change the sandwich and amount controls until clicking calculate. When the user clicks Calculate: a. Validate a numeric value that was entered and display any errors using a message box. b. Use selected radio button and combo-box values to concatenate and display a summary. c. Use entered textbox values to calculate and display cost. When the user clicks Clear, clear the textbox, label value and radio-button, combo-box selection. When the user clicks Exit, terminate the application.   Directions: Please copy the supplied code below into your answer to this question. Use the spaces to write the missing code and complete the program.   namespace MidtermExam{    public partial class frmOrder : Form    {        // Class-level declarations         // Declare decimal constant for Sales Tax Rate of 6% (1 point)         // Declare integer variable for Quantity (1 point)         // Declare decimal variables for Price, Tax, SubTotal and Cost (1 point)         public frmOrder()        {            InitializeComponent();        }         private void btnCalculate_Click(object sender, EventArgs e)        {            // This procedure calculates the total cost and displays them to the user.             // Get the quantity of sandwiches as input from the user.            //  and Verify that the value is integer and not less than zero. (1 point)            if ( )             {                 // Get the price of each sandwich as input from the user.                // and Verify that the value is decimal and not less than zero. (1 point)                if ( )                {                     // Display the Sandwich summary, which is type concatenated with side. (1 point)                             // Call the Calculate() function and display Cost formated as currency. (1 point)                                  }                else                {                    // Display Price error message (1 point)                                   }            }            else            {                // Display Quantity error message (1 point)                             }        }         private void btnClear_Click(object sender, EventArgs e)        {            // This procedure resets the controls to default values. (1 point)               }         private void btnExit_Click(object sender, EventArgs e)        {            // Close the form. (1 point)                 }         public decimal Calculate()        {            // This function performs calculations and returns total cost.             // Calculate SubTotal = Quantity x Price (1 point)                         // Calculate Tax = SubTotal x TaxRate (1 point)                         // Calculate Cost = SubTotal + Tax (1 point)                          // Return the Cost. (1 point)                     }    }}

Read Details

Nakitisha has been consuming more fluids lately and has noti…

Nakitisha has been consuming more fluids lately and has noticed increased urination, along with tingling in her hands and feet, and a slow healing cut on her finger. She most likely is experiencing which of the following?

Read Details

Which of the following would not be an example of personal p…

Which of the following would not be an example of personal preferences?

Read Details

Nutrition is fun!

Nutrition is fun!

Read Details

Anabolic steroids are the natural version of the male hormon…

Anabolic steroids are the natural version of the male hormone testosterone.

Read Details

Rice is an example of ______________________________ food in…

Rice is an example of ______________________________ food in Asia.

Read Details

Which of the following would be a type of aerobic activity?

Which of the following would be a type of aerobic activity?

Read Details

Which of the following are NOT considered social influences…

Which of the following are NOT considered social influences on food habits?

Read Details

Posts pagination

Newer posts 1 … 37,379 37,380 37,381 37,382 37,383 … 71,824 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top