Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Macroeconomics Expert

Java program showing a Loop, Decision Structure, and an array for a company that sells school supplies to children and prints out a receipt in a console window for the user at the end.

Children purchase no more than 10 school supplies at a time (so this should be the size of any arrays you have if you need a number depending on how you set it up.)

Here is the Table of things the person operating the Java Program can choose from based on what the child chooses:

Item Number

Item Name

Price

1

Box of Crayons

4.25

2

Pencil

.15

3

Paper

.05

4

Eraser

.10

Requirements:

1. The program should ask the user for the item number for an amount of items. The user should not directly enter the price. (You will need to use Ifs or a Switch Case decision structure to find that out.)

2. The loop needs to control the entry of the item choices one by one (you can ask the user for a number of items to enter or use a sentinel variable. It is up to you. You must demonstrate a loop though.)

3. The program should store the Item Names and Prices in separate arrays (or one message with both in a string array if you want to do it that way), and it should print out all of the items at the very end of the program when the program is over.

4. Finally, print the total of all the items the user selected. There should be a total for the supplies that are being purchased at this store.

Macroeconomics, Economics

  • Category:- Macroeconomics
  • Reference No.:- M92026250
  • Price:- $25

Priced at Now at $25, Verified Solution

Have any Question?


Related Questions in Macroeconomics

Question topic 2 product or service offered and global

Question: Topic 2: Product or Service Offered and Global Consumption Describe the product or service including brand/logo and packaging. In addition, use the following link, and visit the globalEdge website and describe ...

Question - a 1000 utility bond with 14 years remaining

Question - A $1000 utility bond with 14 years remaining before maturity can now be purchased for $760. It pays interest of $20 each 6-month period. What rate of return is earned by purchasing the bond at the current mark ...

Question at the farmers market in irvine california the

Question: At the farmer's market in Irvine, California, the price of avocados is set at $3 each. At that price, 120 avocados are supplied but only 100 are purchased. Represent this on a supply and demand graph and answer ...

Introductory economics assignment -three problem-solving

Introductory Economics Assignment - Three Problem-Solving Questions. Question 1 - Australia and Canada have a free trade agreement in which, Australia exports beef to Canada. a. Draw a graph and use it to explain and ill ...

Question 1 a consumer lives for two periods the present and

Question: 1. A consumer lives for two periods (the present and the future). His income in period 1 is 100. His income in period 2 is 200. Prices of the single consumption good are $1 per unit in both periods. The interes ...

Question again demand is qd 32 - 15p and supply is qs -20

Question: Again, demand is QD = 32 - 1.5P and supply is QS = -20 + 2.5P. Now, however, buyers and sellers have transaction costs of $2 and $3 per unit, respectively. Compare the equilibrium values with those you calculat ...

Question president trump has put forward a tax plan that

Question: President Trump has put forward a tax plan that would significantly cut personal and corporate income taxes in the U.S. Assume that Congress passes this tax cut plan and President personal Trump signs it into l ...

Question -you have a full-time job but you decide to go to

Question - You have a full-time job but you decide to go to a college and be a full-time student. What is your total economic cost to be a full-time student? Provide and discuss two items of explicit cost and two items o ...

Question - a study was conducted to determine how people

Question - A study was conducted to determine how people get jobs. Four hundred subjects were randomly selected and the following are the results: Job Source of Survey Respondents Frequency Newspaper want ads 69 Online s ...

Question instruction there is a dataset attached called

Question: Instruction: There is a dataset attached called "caschool", it is an excel file. I also upload the description of the data. It is the explanation of the data. If you don't read it you won't be able to answer qu ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As