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]
2 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:
Maslowich2 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
There are no breakpoints in the "Access Customer Account" subpage however there is an error. What will happen if you choose to s
blsea [12.9K]

Answer:

Move to the breakpoint at "Get Customer Details" stage.

Explanation:

This question is incomplete, we need a diagram and four options to resolve this questions, I attached the diagram and the options.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the breakpoint at "Get Customer Details" stage.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the "Recover1" stage.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the stage containing the error on the "Access Customer Account" page.

- The process will work all stages in the "Access Customer Account" page until the error is thrown and then focus would move to the "Exception1" stage.

In this case, we are going to run an extra from subpage testing in <u>Process studio</u>. Process studio is a tool where we can test these processes.

The process always it's going to work all stages in the "Access Customer Account" we're going to receive an interruption when the error is activated, moving the focus to the Get Customer Details stage.

There is an error in the stage Access Customer Account, if we run the processes with the Go button, the focus should move into the Recover1 stage, and should show the error.

But in this particular example, we must use the STEP OUT BUTTON, What means this?

The process it's going be executed, but won't show any error or message, because we have used the STEP OUT BUTTON.

If we use the STEP OUT BUTTON, the process should end but in this case, we have a breakpoint in Get Customer Details stage, for that the focus and the process will end in Get Customer Details stage and not at the end or at the Recover1 stage.

8 0
2 years ago
Can someone tell me how to get rid of the the orange with blue and orange on the status bar
igor_vitrenko [27]

Answer:

Explanation:

i'm not sure how tho

5 0
3 years ago
Read 2 more answers
A(n) _____ is a simple database program whose records have no relationship to one another.
almond37 [142]
"flat file"

A simple database program whose records have no relationship to one another<span>single</span>
7 0
3 years ago
This image shows a web designer's grids for different pages on a website. The uppermost box on each page is the website's identi
allsm [11]

Answer: d

Explanation: hope this helps

6 0
3 years ago
Read 2 more answers
You can select slide objects in order to delete them simultaneously by pressing the _____ key as you click each object. select o
HACTEHA [7]
D tab that is the key you would need to use in order to do that
6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the oldest and most common technique to differentiate information systems?
    8·1 answer
  • _____________ is the characteristic of a resource that ensures that access is restricted to only permitted users, applications,
    14·1 answer
  • The ability to learn a new computer software program is to ____________ as knowledge of state capitals is to _____________.
    11·1 answer
  • Read the section, "Junior Year." Why would someone chose to complete an apprenticeship after high school? How many occupations c
    14·2 answers
  • An Organization Chart to support the Appliance Warehouse case study The SWOT Analysis diagram you performed and created to suppo
    13·1 answer
  • PLZ HELP! ANSWER (WITH CORRECT ANSWER AND EXPLANATION THAT ACTUALLY IS CORRECT) GETS BRAINLIEST!
    13·1 answer
  • The information given to you by your teachers is always accurate and should never be questioned. Please select the best answer f
    8·1 answer
  • Create a method called letterGrade that will pass the student's average grade as a parameter and return a letter grade (char). O
    12·1 answer
  • Which of these statements correctly describe aspects of testing code? Check all of the boxes that apply.
    14·1 answer
  • Four examples of computer virus​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!