1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vovikov84 [41]
3 years ago
8

Create an application that determines the final cost of food items and non-food items, assuming only non-food items are taxed. T

he interface should prompt the user for the total cost of food items and the total cost of non-food items. Display the final cost when an Answer button is clicked. Use a constant for the tax with value of 7%.
Computers and Technology
1 answer:
Maslowich3 years ago
8 0

Answer:

Write the following in the button click event:

<em>    double total = Convert.ToDouble(txtNonFood.Text) + Convert.ToDouble(txtFood.Text) * (1 + 0.07); </em>

<em>            MessageBox.Show("Total: " + total);</em>

Explanation:

The app is created using Winforms C#.

First, is to design the form using 2 labels, 2 textboxes and 1 button.

<em>The text of the labels are set to "Food Items" and "Non Food Items", respectively.</em>

<em>The name of the textboxes are set to txtFood and txtNonFood respectively.</em>

Next, is to ensure that the textboxes accept only numbers and 1 decimal point.

So, we need to create a keypress event:

<em>private void txtNonFood_KeyPress(object sender, KeyPressEventArgs e){</em>

<em />

And then, write the click event to display the total amount of items (as written in the answer section):

This calculates the total amount

<em>    double total = Convert.ToDouble(txtNonFood.Text) + Convert.ToDouble(txtFood.Text) * (1 + 0.07); </em>

<em>This prints the total amount</em>

<em>            MessageBox.Show("Total: " + total);</em>

<em>See attachment 1 for app interface & attachments 2 and 3 for complete program code</em>

You might be interested in
Organizational sites with .org domains are usually managed by what type of organization
Harlamova29_29 [7]

i would say government organizations

4 0
3 years ago
Imagine you are responsible for making a presentation that includes a representation of the logic flow through a process. You un
svetoff [14.1K]

Answer:

find reliable resources

Explanation:

if you find reliable resources, than you might able to have more help i know im not answering..but im trynna help

3 0
3 years ago
Which of the following is NOT true about simple machines?
12345 [234]

Answer:

option A : they can change the amount of force required .

8 0
3 years ago
________ and wpa are wireless security protocols which use encryption to secure wi_fi networks.
ra1l [238]
Im pretty sure its WEP :)
7 0
4 years ago
The internet has opened a wide range of new opportunities for small businesses. true or false?
lorasvet [3.4K]
True, because they can now sell to wider public and have access to new methods to finance their projects.
7 0
4 years ago
Other questions:
  • To use hand and power tools safely, you should:
    9·2 answers
  • Which of the following statements are true of network packets? Check all of the boxes that apply. They contain control informati
    10·1 answer
  • Teachers in most school districts are paid on a schedule that provides a salary based on their number of years of teaching exper
    7·1 answer
  • In the following code, what values could be read into number to terminate the while loop? Scanner keyboard = new Scanner(System.
    8·1 answer
  • In what way can parents use technology in their children’s development?
    11·2 answers
  • One shortcoming of rapid application development (RAD) is _____.
    9·1 answer
  • How does one award the brainliest???? will give brainliest.
    8·2 answers
  • QUESTION 1
    15·1 answer
  • Discuss the factors which cause imbalance in the environment.
    8·1 answer
  • Make a list of any four computer that were used in the history of computer.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!