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
What is the main purpose of a graphic organizer?
timama [110]
B. To organize information using shapes.
8 0
3 years ago
Read 2 more answers
Can someone please help me! It’s due Thursday!
Eva8 [605]

Answer:

if the input is zero the out put is 1

Explanation:

because if you think about it if the input was 1 the output would be zero

7 0
2 years ago
________ can be written only once. The data cannot be erased or written over once it is saved.​
notka56 [123]

Answer:

WORM (Write Once, Read Many)

Explanation:

The full meaning which means Write Once, Read Many implies that data can only be entered (or better put, written) once. Once the data has been written, the data can not be updated or deleted. However, the data being stored on WORM can be read as many times, as possible.

Hence, WORM answers the question.

6 0
2 years ago
What is the default setting Excel shows when Insert is clicked?
NikAS [45]

Answer: entire column

7 1
3 years ago
Read 2 more answers
Which of the following scenarios demonstrates leadership?
bulgar [2K]
I can’t see the scenarios bro
8 0
3 years ago
Read 2 more answers
Other questions:
  • When you arrive at work one morning, your inbox is full of messages complaining of a network slowdown. you collect a capture fro
    12·1 answer
  • Why is the len ( ) function useful when using a loop to iterate through a stack?
    6·1 answer
  • Consider the following definition of the recursive function mystery. int mystery(int first, int last) { if (first &gt; last) ret
    12·1 answer
  • 4.17 LAB: Varied amount of input data ( C++)
    5·1 answer
  • What is episodic memory? knowledge about words, concepts, and language-based knowledge and facts information about events we hav
    10·1 answer
  • Ok.,so i have a sopitify account and by accident i pressed the downlaod on button and it says start you free trial i pressed tha
    11·2 answers
  • This exercise shows why each pivot (in eli1nination by pivoting) must be in a different row. (a) In Example 7, make the third pi
    15·1 answer
  • What is algorithm and how does it works​
    11·2 answers
  • How do you delete questions you asked?
    7·2 answers
  • What are two benefits of defining a function?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!