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
Specifications What are the best practices you should communicate to the Design team about the formatting of the spec book
Evgen [1.6K]

The Spec book, describes a formatted writing which contains the major specifications and description of the building blocks of an application or process. The design process should follow formatting guidelines such as ;

  • Inclusion of table of content, which gives a table like format of the content in the book within the first 25 pages.

  • Inclusion of the Spec section number in the <em>header and footer section</em> of each page of the book.

  • Avoid including any other value with the <em>spec section number</em>. Hence, the spec section number must be distinctly seperated.

Learn more : brainly.com/question/25648287

3 0
2 years ago
What are the lyrics to passengers song Let Her Go?
kkurt [141]
Well you only need the light when it's burning low
Only miss the sun when it starts to snow
Only know you love her when you let her go
Only know you've been high when you're feeling low
Only hate the road when you're missing home
Only know you love her when you let her go
And you let her goStaring at the bottom of your glass
Hoping one day you'll make a dream last
But dreams come slow and they go so fast
You see her when you close your eyes
Maybe one day you'll understand why
Everything you touch surely dies'Cause you only need the light when it's burning low
Only miss the sun when it starts to snow
Only know you love her when you let her go
Only know you've been high when you're feeling low
Only hate the road when you're missing home
Only know<span>…</span>
3 0
3 years ago
Read 2 more answers
Who is the creator of the JavaScript scripting language?
mart [117]
Brendan Eich I think?

6 0
3 years ago
Read 2 more answers
A CPU with interrupt driven I/O is busy servicing a disk request. While the CPU is midway through the disk-service routine, anot
Novosadov [1.4K]

Answer:

  • Working scenario:

When a CPU is working with interrupt driven I/O scheme, it will control the I/O interrupt on the basis of priority. This means that interrupts with higher priority will be processed first and others will be processed later.

  • Part (a)

When the CPU is busy servicing a disk request and another I/O interrupt occurs, the CPU will check the priority line (assigned during design phase) of both the interrupts and then decides the precedence from both of them.  

When the CPU gets ready to process the interrupt, an Interrupt Acknowledge signal (INTA) is sent back in return to interrupt signal (INT).

  • Part(b)

Occurring of interrupts while the CPU is midway through the disk-service is not a problem. It can happen normally.

  • Part (c)

Occurring of interrupts while the CPU is midway through the disk-service is not a problem, the CPU just picks the multiple interrupts checks the priority line and processes one of the multiple interrupts based on the highest priority matter.

i hope it will help you!

6 0
3 years ago
What is the typical relationship between time and interest rate?
RoseWind [281]
The relationship is that the more time that goes by the more interest you will pay.
7 0
4 years ago
Other questions:
  • The following code should take a number as input, multiply it by 8, and print the result. In line 2 of the code below, the * sym
    7·1 answer
  • Maya enjoys connectedWith her friends and social media apps but one of her friends post a lot of stuff that my thinks it’s annoy
    14·1 answer
  • Robin ensures that she is always available if anyone in the team needs her. Which quality is shown by robin?
    9·2 answers
  • Which type of data is presented on the y-axis?
    14·2 answers
  • The instant pivot button is displayed in the statistics and visualization tabs when a _______ search is run.
    15·1 answer
  • The basic work area of the computer is it screen that you when you first fire up your computer
    6·1 answer
  • A Silicon Valley billionaire purchases 3 new cars for his collection at the end of every month. Let a_n denote the number of car
    8·1 answer
  • In which table is the input and the corresponding output of a Boolean function listed? How is the output of the NAND gate determ
    9·1 answer
  • 1. Implement the function dict_intersect, which takes two dictionaries as parameters d1 and d2, and returns a new dictionary whi
    8·1 answer
  • Create a program that allows the user to input a list of first names into one array and last names into a parallel array. Input
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!