Determining the loop-decision structure

Assignment Help Basic Computer Science
Reference no: EM131274855

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.

Reference no: EM131274855

Questions Cloud

Explain whether or not the intruder is liable for his action : Explain whether or not the intruder is liable for his actions. Explain your legal duties and responsibilities to Sharon and Daryl. Differentiate among some of the potential torts that might arise from this business context. Discuss ways to prevent or..
Represented with each signal change : A carrier wave is modulated with 4 amplitudes and 4 phase changes; how many bits can be represented with each signal change?
Describe type of communication mechanism that can be adopted : Describe the types of communication mechanisms that can be adopted by Richard to help ensure better understanding and co-ordination not only with existing employees, but also with new employees?
How might parents schools the juvenile courts : How might parents, schools, the juvenile courts and service providers better communicate and work together to identify treatment and behavioral needs of juvenile offenders and to create cross-disciplinary approaches to case management?
Determining the loop-decision structure : 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.
Concerning the market test of the new cups and carriers : Concerning the market test of the new cups and carriers, I have a few suggestions that may be helpful, although the final decision is yours - During the third weekend we'll have someone make a survey at the store to determine its acceptance
What made the individuals professional : Describe and explain what you viewed. Answer the following questions in your response: Were the individuals professional? What made the individuals professional (consider attire, communication skills, presentation of self, etc.)?
Identify the resources required for implementation : Describe the range of available options from which a VPN solution can be selected. Identify the resources required for implementation.
Display the proper message on that and terminate : Display the user's name (first and last), hourly rate, hours worked, withholding tax percentage, withholding tax and gross pay. When a user is not an employee - display the proper message on that and terminate the application. Use logical AND and OR ..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Compute and display the average age

Create a Class StudentType Create a StudentType array of 50 students Set the age of the first student to 10, second student to 11, and so on until the last student to 59. Compute and display the average age of all 50 students with the help of a fu..

  Define the function and module breakup

Define the Function and module breakup

  Letters of the word leading

In how many diferent ways can the letters of the word 'LEADING' be arranged in such a way that the vowels always come together?

  Design an algorithm to find all the common elements

Design an algorithm to find all the common elements in two sorted lists of numbers. For example, for the lists 2, 5, 5, 5 and 2, 2, 3, 5, 5, 7, the output should be 2, 5, 5.What is the maximum number of comparisons your algorithm makes if the lengths..

  Where is quality assessed within the task set

How is this accomplished? How are the quality attributes discussed in Section 8.2.1 achieved?

  Write a combined state transition and output table

Choose state encodings and write a combined state transition and output table using your encodings. Write the next state and output equations and sketch your FSM schematic.

  Summarize the different types of data storage technology

Discuss common input / output technologies. Summarize the different types of data storage technology.

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Explain succinctly the difference between the database

Explain succinctly the difference between the database of a network management system and its MIB. How do you implement each in a network management system?

  Sinusoidal wave is described by the equation v

Assume as sinusoidal wave is described by the equation v(t) = 100 v sin(200t + 0.52).    (a) From this expression, determine the peak voltage, the average voltage, and the angular frequency is rad/s.

  Representations of sign and magnitude

1 Give the data representation of each of the following integers assuming 16 bits and each of the representations of sign and magnitude, one's complement, and two's complement. The answers must be expressed in hexadecimal. a. 5159c. -11111

  Amount invested in each if her overall

If Sam invested part of her $20,000 bonus in a fund that paid an 8% profit and invested the rest in stock that suffered a 5% Loss, what is the amount invested in each if her overall net profit was $690.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd