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
mars1129 [50]
3 years ago
12

Write a program to create a customer bill for a company. The company sells only five products: TV, DVD player, Remote Controller

, CD Player, and Audio Visual Processor. The unit prices are $500.00, $380.00, $35.20, $74.50, and $1500.00, respectively. Part I ( this part is not that much different from Lab 2, as far as formatting) Prompt the user and input for the quantity of each product sold. Calculate the Subtotal for each item and the Subtotal of the bill. Calculate the Tax on the Bill Subtotal. Last calculate the grand Total of Subtotal plus Tax. Test Data sets: 13, 2, 3, 1, 21 Sample Outputs: How many TVs were sold? 13 How many DVD players were sold? 2 How many Remote Controller units were sold? 3 How many CD Players were sold? 1 How many AV Processors were sold? 21
Computers and Technology
1 answer:
Goshia [24]3 years ago
3 0

Answer:

A program written in C++ was create for a customer bill for a company. the company sells five products, which are TV, DVD player, Remote Controller, CD Player, and Audio Visual Processor.

The code is implemented and shown below in the explanation section

Explanation:

<em>Solution:</em>

The C++ Code:

#include<iostream>

#include<string>

#include<iomanip>

using namespace std;

#define taxrate 8.75

int main(){

const double upTv = 500.00;

const double upDvdPlayer = 380.00;

const double upRemoteController = 35.00;

const double upCdPlayer = 74.00;

const double upAudioVideoProcessor = 1500.00;

cout << "How many TVs were sold? ";

double ntv;

cin >> ntv;

cout << "How many DVD players were sold? ";

double ndvd;

cin >> ndvd;

cout << "How many Remote Controllers were sold? ";

double nrc;

cin >> nrc;

cout << "How many CD Players were sold? ";

double ncd;

cin >> ncd;

cout << "How many AV Processors were sold? ";

double nav;

cin >> nav;

double ptv = ntv * upTv;

double pdvd = ndvd * upDvdPlayer;

double prc = nrc * upRemoteController;

double pcd = ncd * upCdPlayer;

double pav = nav * upAudioVideoProcessor;

double tp = ptv + pdvd + prc + pcd + pav;

cout << setw(5) << left << "QTY";

cout << setw(20) << left << "Description";

cout << setw(15) << left << "Unit Price";

cout << setw(15) << left << "Price" << endl;

cout << setw(5) << left << (int)ntv;

cout << setw(20) << left << "TV";

cout << setw(15) << left << fixed << setprecision(2) << upTv;

cout << setw(15) << left << fixed << setprecision(2) << ptv << endl;

cout << setw(5) << left << (int)ndvd;

cout << setw(20) << left << "DVD";

cout << setw(15) << left << fixed << setprecision(2) << upDvdPlayer;

cout << setw(15) << left << fixed << setprecision(2) << pdvd << endl;

cout << setw(5) << left << (int)nrc;

cout << setw(20) << left << "Remote Controller";

cout << setw(15) << left << fixed << setprecision(2) << upRemoteController;

cout << setw(15) << left << fixed << setprecision(2) << prc << endl;

cout << setw(5) << left << (int)ncd;

cout << setw(20) << left << "CD Player";

cout << setw(15) << left << fixed << setprecision(2) << upCdPlayer;

cout << setw(15) << left << fixed << setprecision(2) << pcd << endl;

cout << setw(5) << left << (int)nav;

cout << setw(20) << left << "AV Processor";

cout << setw(15) << left << fixed << setprecision(2) << upAudioVideoProcessor;

cout << setw(15) << left << fixed << setprecision(2) << pav << endl;

cout << setw(15) << left << "SUBTOTAL";

cout << setw(15) << left << fixed << setprecision(2) << tp << endl;

cout << setw(15) << left << "TAX";

cout << setw(15) << left << fixed << setprecision(2) << taxrate << endl;

double ttp = tp + 0.0875 * tp;

cout << setw(15) << left << "Total";

cout << setw(15) << left << fixed << setprecision(2) << ttp << endl;

return 0;

}

You might be interested in
Interactive television with video-on-demand capabilities changes how people watch television and how consumers access the Intern
Alex787 [66]

Answer:

High learning

Explanation:

High Learning means that a product require significant customer education before customers understand how the product functions and that may make the product stay longer in the introduction stage whilst the customers are being familiarize with it. Examples are microwave ovens.

6 0
3 years ago
A factory producing cables for personal computers finds that its current average
puteri [66]
This is normal as personal computers, unless designed to, don't usually put out a ton of power it's mostly just what your battery need and a bit more that's it
8 0
3 years ago
Steven is in a meeting and he is sharing a graph on his monitor with fifty other people. So that the others do not need to crowd
nevsk [136]
The answer is D) Projector because with a projector, its in the name project so it can anything u put on their, and put it on a virtual screen that can be put on a wall, so everyone can see.
8 0
3 years ago
How do you do this question?
elena55 [62]

Answer:

for (scores.Entry<String, Integer> entry : scores.entrySet()) {

          int value=0; String key="Rambo";

          String k = entry.getKey();

           int v = entry.getValue();

           if (v>value)

           {

               value =v;

           }

           else

           {

               value=value;

           }  

       }

       for( scores.Entry<String, Integer> entry : scores.entrySet())

      {

        if( entry.getValue()==value)            

        System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());

      }

Explanation:

The above scores are an object of Map type.  And this is a parameter of findUopStudent function. So scores is a Map, and entry is an item. And we get its key and value. Now we compare each value using senteniel method and find the maximum value. Now we iterate through the scores using for the look and check the value of each entry against the maximum value found, and we print out the entry with maximum value. And that is the top student, which is required.  

4 0
2 years ago
What is the simplest way to permanantly get rid of an unwanted file
UNO [17]
If on a computer, if thee computer says they put it in the recycling bin, the go to the recycling bin and right click and delete. If a paper, throw away. If other, do what your body desires to do.<span />
4 0
3 years ago
Other questions:
  • A(n) _______ created in Microsoft Word or another word-processing program works well as a shell for a PowerPoint presentation.a.
    9·1 answer
  • Enhancing and optimizing customer retention and loyalty is a major business strategy.
    15·1 answer
  • In modern computer memory, each location is normally composed of one byte.
    7·1 answer
  • Given the following class import java.util.ArrayList; public class RectangleTester { public static void main(String[ ] args) { A
    7·1 answer
  • How do optical discs store data? select one:
    15·1 answer
  • You are required to write a calculator for Geometric shapes(Circle, Square, and Rectangle). The basic idea is that you willprovi
    7·1 answer
  • Calculate the performance of a processor taking into account stalls due to data cache and instruction cache misses. The data cac
    11·1 answer
  • In addition to paying $100 per month for health insurance, sam is responsible for paying her first $500 of medical bills every y
    10·1 answer
  • A column does not consist of
    10·1 answer
  • The ________ approach to motivation suggests a connection between internal physical states and outward behavior. achievement dri
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!