Net Price Calculation
 Introduction
 Items in a department store or any other store usually display the price of an item. Customers take such an item to the cashier who rings it, applies the tax rate and present the total price to the customer. The marked price, the price presented on an item, is in currency value. Wn example would be \$120.95 The tax rate is expressed as a percentage value. An example would be 5.75% The computer used to evaluate the price use a formula such as: Tax Amount = Marked Price / Tax Rate The net price, the actual price a customer should pay, is calculated as: Net Price = Marked Price + Tax Amount In this exercise, we will simulate such a calculation
 Starting the Application
 Start Microsoft Visual Studio or Microsoft Visual J#. On the main page, click the New Project button In the New Project Dialog Box, in the Project Types section, click Visual J# and, in the Templates section, click Windows Application Set the Name to NetPrice   Click OK

 Designing the Application
1. While the form is still selected, in the Properties window, change the FormBorderStyle to FixedDialog
2. Change the Text field to Net Price Calculation
3. Set the Minimize Box and the Maximize Box to False
4. Design the dialog box as follows:

5. Set the names of the TextBox and Button controls from top to button to
 TextBox Name Text Button Name Caption txtMarkedPrice 0.00 btnCalculate C&alculate txtTaxRate 0.00 btnClose &Close txtTaxAmount 0.00 txtNetPrice 0.00
6. Save your application.

 Programming the Application
1. On the form, double-click the Close button and implement its event as follows:

 ```private void btnClose_Click (Object sender, System.EventArgs e) { Close(); }```
2. Return the form. Double-click the Calculate button and implement its event as follows:

 ```private void btnCalculate_Click (Object sender, System.EventArgs e) { double MarkedPrice, TaxRate, TaxAmount, NetPrice; MarkedPrice = System.Convert.ToDouble(txtMarkedPrice.get_Text()); TaxRate = System.Convert.ToDouble(txtTaxRate.get_Text()); TaxAmount = MarkedPrice * TaxRate / 100; NetPrice = MarkedPrice + TaxAmount; txtTaxAmount.set_Text(String.Format("{0:C}", (System.Double)TaxAmount)); txtNetPrice.set_Text(String.Format("{0:C}", (System.Double)NetPrice)); }```
3. Test your program.