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
Write a program that reads in an array of type int . you may assume that there are fewer than 50 entries in the array. your prog
Alla [95]
This may be a difficult thing to do so for anyone to ACTUALLY answer this you migghttt want to up the amount of points you get for answering maybe, 20-40 points.
7 0
3 years ago
ASAP
grin007 [14]
I would recommend A. Quickly on the left and move ahead of it because you should always pass on the left and seeing as it is a large truck, you would want to get ahead of it ASAP.
4 0
4 years ago
Read 2 more answers
legacy application that has hard-coded static IP addresses and is running on an EC2 instance, what is the best failover solution
AlladinOne [14]

Answer:

Elastic IP address

Explanation:

Elastic IP addresses are static, persistent public IP addresses which can be associated and disassociated with the instance, as required.

This will provide the best failover solution that will keep same IP address on a new instance.

6 0
4 years ago
The engine type that is fired by gas or oil
salantis [7]
Internal combustion is the answer
8 0
3 years ago
Read 2 more answers
Read the quotation from "Song of Myself."
Phantasy [73]

Based on the first stanza from "Song of Myself," the overall style suggests: B. that Whitman's style allows for various kinds of language.

<h3>What is a poem?</h3>

A poem is a literary work that comprises either written or spoken words which are carefully chosen and arranged in separate lines, especially based on their diction (sound), rhythm, and meaning.

Based on the first stanza from "Song of Myself," we can infer and logically conclude that the overall style suggests: B. that Whitman's style allows for various kinds of language.

Read more on Whitman's style here: brainly.com/question/12881683

#SPJ1

6 0
2 years ago
Other questions:
  • Here's something to stop you from getting repetitive when writing essays. Write a program that reads multiple lines of plain tex
    15·1 answer
  • What is pressure?
    7·2 answers
  • Which of the following is an example of a consumer service? computer builder motorcycle manufacturer cabinet maker air condition
    15·2 answers
  • What do we call a subset of new media in which groups and their fans can interact directly?
    14·1 answer
  • Ideally, how often should you back up the data on your computer? once an hour once a day once a month once a year
    14·2 answers
  • To make IPv4 addresses a little easier for human beings to understand, the 32-bit binary addresses are represented by dotted dec
    9·1 answer
  • The degree to which a firewall can impose user access restrictions is known as which of the following?Security assurancePrivileg
    8·1 answer
  • A USB device used to transfer photos from the memory card to a hard drive is called a _____.
    12·1 answer
  • Computer software is regarded a bridge between the hardware and software.elaborate the statement outlining types and functions o
    10·1 answer
  • Use the following flowchart to implement a simple application that will help students decide whether computer science is a good
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!