Assume that an imaginary supermarket sells items that are identified by a unique item number which...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assume that an imaginary supermarket sells items that are identified by a unique item number which is an integer in range 100 to 499 inclusive. The items are classified in four different categories based on their numbers, and each category defines a different sales tax rate. These four categories along with the range of item numbers included in them, and their specific sales tax rates have been summarized in the following table: Category A Item Numbers Sales Tax Rate 100-199 0 B 200-299 5% C 300-399 7% D 400-499 12% You are to write a program that reads the information of the items sold to a customer from keyboard (i.e. the item number, quantity, and unit price), calculates the invoice subtotal including the applicable taxes, and for example displays the following information on the screen: Subtotal Before Tax 1000.00 NOTE Total Tax 125.00 Subtotal Plus Tax 1125.00 1. Format your output to be printed organized like a table. To do so, try to set up an appropriate minimum field width, change the alignment of your outputs, and consider two digits of precision for your amounts. 2. Validate your inputs when necessary, display an error message and try to get a new input in case an invalid input has entered. Part 2 Modify your program in Part 1 to produce the above-mentioned report for 100 customers. Assume that an imaginary supermarket sells items that are identified by a unique item number which is an integer in range 100 to 499 inclusive. The items are classified in four different categories based on their numbers, and each category defines a different sales tax rate. These four categories along with the range of item numbers included in them, and their specific sales tax rates have been summarized in the following table: Category A Item Numbers Sales Tax Rate 100-199 0 B 200-299 5% C 300-399 7% D 400-499 12% You are to write a program that reads the information of the items sold to a customer from keyboard (i.e. the item number, quantity, and unit price), calculates the invoice subtotal including the applicable taxes, and for example displays the following information on the screen: Subtotal Before Tax 1000.00 NOTE Total Tax 125.00 Subtotal Plus Tax 1125.00 1. Format your output to be printed organized like a table. To do so, try to set up an appropriate minimum field width, change the alignment of your outputs, and consider two digits of precision for your amounts. 2. Validate your inputs when necessary, display an error message and try to get a new input in case an invalid input has entered. Part 2 Modify your program in Part 1 to produce the above-mentioned report for 100 customers.
Expert Answer:
Related Book For
Fundamentals Of Database Systems
ISBN: 9780133970777
7th Edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these finance questions
-
Please complete the Critical Thinking Problem CT1.1 on Page 1-47 of your textbook. Also listed below. CT1.1 The financial statements of Apple, Inc. are presented in Appendix A of your textbook....
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
Julie is a private pilot and is flying to Kingaroy to meet up at her grandparent's property for an annual family barbeque. While flying overhead she decides to descend and fly over the family's...
-
What is step-down allocation? What are some criticisms of this allocation method?
-
Three missiles are fired at an enemy arsenal. The probabilities the individual missiles will hit the arsenal are 0.75, 0.85, and 0.9. Find the probability that at least two of the missiles hit the...
-
Assuming that you have successfully answered the preceding problem and understand the significance of the salt, here is another question.Wouldnt it be possible to thwart completely all password...
-
The trial balance of Jeremina plc as at 31 March 2002 is as follows: (i) Stock of finished goods on 31 March 2002 163,000. (ii) Motor expenses and depreciation on motors to be apportioned:...
-
Jay Pembroke started a business. During the first month (April 20--), the following transactions occurred. (a) Invested cash in business, $18,000. (b) Bought office supplies for $4,600: $2,000 in...
-
Refer to Sales Journal below: Sales Journal for January 4 Credit Archer Limited Purchased 6 boxes of tiles $ 1,000 Beta Company Purchased 8 boxes of tiles 1,250 Cooper Limited Purchased a cord of...
-
Consider an experiment where you roll a single six-sided die and observe the number of dots. The sample space is S = (1, 2, 3, 4, 5, 6). However, the die is unbalanced and the probability each side...
-
The first and last term of an arithmetic series is given as well as the common difference. Determine the number of terms in the series and the sum of the series. a = 100 tn = - 100 d = - 10
-
Describe the role of G protein-coupled receptors (GPCRs) in signal transduction. How do they contribute to cellular communication and what implications does their dysfunction have in diseases like...
-
1. An automatic dryer spins wet clothes at an angular speed of 6.0 rad/s. Starting from rest, the dryer reaches its operating speed with an average angular acceleration of 3.1 rad/s?. How long does...
-
Find the present value of the following stream of a firm's cash flows, assuming that the firm's opportunity cost is 8%. End of year Cash flow 1 $5,000 2 $25,000 3 $14,000
-
1. How are risk management and quality management used in health care? 2. What is the difference between them? 3. What are the similarities? 4. Why is it important for you to understand the...
-
Partnership: Sweetvale Primer, L.P. is a limited partnership. Investment Objectives: The Partnership's investment object is to achieve above average capital appreciation with a low correlation to the...
-
Michelles trust is subject to 3.8% surtax on the lesser of the trusts net investment income or the excess of the trusts adjusted gross income over the $12,400 threshold (the highest trust tax rate)....
-
Discuss how each of the following features is realized in SQL 2008: object identifier, type inheritance, encapsulation of operations, and complex object structures.
-
What is social search? What does collaborative social search involve?
-
Describe conceptually how an SQL retrieval query will be executed by specifying the conceptual order of executing each of the six clauses.
-
What roles are played by the CICA, the CGAAC, and the SMAC for their members?
-
The following questions deal with audits by public accounting firms. Select the best response for each question. a. Which of the following best describes why an independent auditor is asked to...
-
Explain what is meant by determining the degree of correspondence between information and established criteria. What are the information and established criteria for the audit of Jones Ltd.'s tax...
Study smarter with the SolutionInn App