 |
|

|
 |

11/19/09 - Practice on GUIs
|
 |
 |
 |
  | A retail company must file a monthly sales tax report listing the total sales for the month and the amount of state and county sales tax collected. The state sales tax rate is 4% and the county sales tax rate is 2%.
Create a SalesTaxEngine class that has a constructor that takes total sales for the month as a string, has instance variables for county sales tax, state sales tax and total tax, a method to return the county sales tax as a formatted (e.g., $123.45) string, a method to return the state sales tax as a formatted string and a method to return the total sales tax as a formatted string. The county tax rate (0.02) and the state tax rate (0.04) should be named constants in your SalesTaxEngine class.
Then create a SalesTax class that allows the user to enter the total sales for the month into a text field and then press a button to display the county, state and total taxes in read-only text fields.
|
 |
 |
|


 |
 |
 |