Design and create programs using control structures

Assignment Help JAVA Programming
Reference no: EM131265990

Your consulting firm has been hired to develop a program that meets the following requirements.

Your program must provide a menu to the user. This menu should list five different products of your choice. Once the user selects one product, they should specify which state they are located. The state choices should include CT, VT, WI, CA and WA. State taxes vary for each state (7.5%, 7.8%, 6.8%, 7.2% and 6.4%, respectively). The user should then specify the desired number of cases (assume there are 12 items per case). The appropriate state tax should be added to the total cost of the product (Item quantity multiplied by unit price). Next, using the Math class random method, generate 20 numbers ranging between 1-100. Ensure there are no duplicates.

Display the following to the user.
Name of the product selected
Number of cases
Number of items
Subtotal (units * price per unit)
State tax (with the percentage and state abbreviation in parentheses),
Total cost (subtotal plus state tax)
The table of random numbers displayed in a table of five numbers per row

Requirements:

You need to use at least one repetition statement, one selection statement, Scanner class, at least one array and the random method in this code. For generating random numbers you should use the random () static method of class Math. It returns a double so you will need to cast it as an integer. For example,

number = (int) ( range * Math.random () ) + 1;

Your assignment submittal should include your Java program with commented Java source code files.

This assignment will also be assessed using additional criteria provided here.

Objective

Use loops and decision structures in programs
Design and create programs using control structures
Use arrays, strings, and other common data types.

Reference no: EM131265990

Questions Cloud

Interest and principal will be repaid on the maturity date : A 1- year, 6%, $30,000 promissory note was signed at the Citizens National Bank. Interest and principal will be repaid on the maturity date of Feb 1, 2014 _This is for the month of Feb 2013 -Im trying to figure out the amount. Cash: ? Note..
Find the per phase emf if the conductors are connected : A 50-Hz synchronous salient pole generator is driven by a hydro-electric turbine at a speed of 125 rpm. There are 576 stator slots with two conductors per slot. The air-gap diameter is 6.1 m and the stator length is 1.2 m. The sinusoidally distrib..
Action the overall economy will suffer : An interesting paradox called the "Paradox of Thrift" arises when households become concern about their future and attempt to increase their saving. As a consequence of such action the overall economy will suffer. Explain. Do you agree with thi..
Use the allowance method for estimating bad debt : You have started a business that has now been going for a couple of years. Due to the increased volume in sales, you have started noticing more bad debt and want to use the allowance method for estimating bad debt. Would you use the percentage of sal..
Design and create programs using control structures : Design and create programs using control structures. Your program must provide a menu to the user. This menu should list five different products of your choice. Once the user selects one product, they should specify which state they are located.
Infrastructure on the east coast : Hurricane Sandy in 2011 destroyed much capital in houses, buildings, and infrastructure on the East Coast, but resulted in little loss of life or limb. What would you expect to be the effect on actualoutput and potential output in the short run (r..
Calculate the frequency of emf in the armature coils : A 6-pole, wave-connected dc armature has 300 conductors and runs at 1200 rpm. The emf generated is 600 V. Find the useful flux/pole.
Does method have a societal marketing orientation : Does Method have a societal marketing orientation, or is it just a marketoriented company that integrates a number of environmental practices into its operations? Explain.
Power-sizing exponent for a centrifugal blower : White County, a neighbor, is considering buying a similar blower with a capacity of 15,000 cubic feet in 2007. Estimate the cost for the blower. The power-sizing exponent for a centrifugal blower is 0.59.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write an application with three labeled text field

Write an application with three labeled text fields,one each for the initial amount of a savings account, the annual interest rate, and the number of years. Add a button "Calculate" and a read-only text area to display the balance of the savings acco..

  Discuss the use of java as a web-based application tool

Discuss the use of Java as a Web-based application tool and as a cross-platform programming language. Provide some example benefits and a general discussion of how the cross platform technology works.

  Inheriting from the jframe class

What is the difference between inheriting from the JFrame class and using a JFrame member variable?

  Write a program in java to repeat hello world

Write a program in Java to repeat Hello World 10 times. What is JVM (Java Virtual Machine)

  Programming using the java language

Programming using the Java language. The basic concepts of object-oriented programming. Topics used will include algorithmic logic, control structures, data and program design, objects and classes.

  Consider the following conditions

Consider the following conditions: An enqueuer waiting on a full-queue or a dequeuer waiting on an empty queue sleep indefinitely, unless woken up by another thread. A thread must send a signal ONLY when it adds an element to an empty queue or remove..

  Imagine that you have been assigned

Imagine that you have been assigned to implement a sorting program. The goal is to make this program general purpose, in that you don't want to define in advance what record or key types are used

  What is method overloading

1. What is method overloading? 2. What is the purpose of a constructor? 3. How do you call a method of one class from a method of another class?

  Write a new queue method called movetorear

Write a new queue method called moveToRear() that moves the element currently at the front of the queue to the rear of the queue. The element that was second in line will be the new front element. Do this using methods q.enqueue() and q.dequeue()

  Credit card expenses

You started recording every credit card transaction so that you can analyze your monthly expenses. You used an Excel worksheet to track dates, places, categories, and amounts. Because you are a consultant who travels periodically, you also have bu..

  Prepare a program to implement array

Write a method, insertAt, that takes four parameters: an array of integers; the length of the array; an integer, say insertItem; and an interger, say, index.

  Performance of both the threaded and non-threaded versions

Please modify the Java program by adding threads, and analyze the performance of both the threaded and non-threaded versions.

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