Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java Create a program for the your company. Come up with a name for your company. Decide on the product that your company sells

Using Java

image text in transcribedimage text in transcribed

Create a program for the your company. Come up with a name for your company. Decide on the product that your company sells and 3 categories for that item. For example, your company could sell T-shirts in 3 sizes, small, medium, and large. The more items the customer orders, the price per item drops. Create a 2 dimensional array for the prices. The rows will represent the categories and the columns will represent the number of items ordered. The following sample table contains the prices based on size and number of items ordered. Please create your own prices for the items that your company sells. Create your own ranges for discounts. All orders that are $50.00 or over are shipped free. For all other orders the following table shows the shipping costs. You may create your own shipping prices as well. Create a program that displays a menu that list the customers options. For example: Widget Order Menu 1. Place an order 2. Totals Sales 3. Exit Program When you the user selects to place an order, call a function that prints a list of the items for sale along with the prices and a menu for the user to select from. For example: The more widgets you order the cheaper the price per widget. Wlidrat Drirac 1. Order Small Widgets 2. Order Medium Widgets 3. Order Large Widgets 4. Complete Order Please choose an option: When they make a selection ask then how many they want. Then display the list of items for sale along with the prices and a menu for again so they can order more. Keep a running total of all the items ordered until the customer chooses to either check out. So for example if the customer selected 1 to order small widgets, and they ordered 10 of them, then they selected 2 to order medium widgets and ordered 15 of them. Then they entered 1 again to order more small widgets and this time they ordered 25 , they now have an order for 35 small widgets and 25 medium. Once the customer chooses to complete their order, calculate their totals, including tax and shipping for the order. You will then need to call a function that will create a new object of your Order class. It will then set all the totals in the new object and add the new object to an ArrayList of orders. The ArrayList of orders will need to be created in main and passed to the functions that need it. Then print a receipt for them. For example: The tax rate for this program is set at 8.25% and it is only charged on the total costs of items ordered, not on the shipping costs. The shipping fee is based on the total costs of the items ordered before tax. When an order has been completed and a receipt has been printed, return the program to the first menu to allow another customer to place an order. When Total Sales is chosen from the menu, call a function that will receive the ArrayList of orders as a parameter. It will then total up the number of items sold in each category and the total amount of sales for the day. For example, if you were selling widget in small, medium, and large sizes. If 3 separate orders were placed, the first one purchased 100 small, 150, medium, and 80 large. The second order purchased 75 small, 90 medium, and 50 large. The third order purchased 150 small, 300 medium, and 100 large. Then the function to print out the Total Sales would print: Total Sales for Today Small T-shirts: 325 Medium T-shirts: 540 Large T-shirts: 230 Total Amount of Sales: $615.45 You must use functions in your program. Each menu option except exit should be a separate function. The only processing that can be done in main is calling of other functions based on the customer's choice. Create a class to keep up with all the orders. This class will contain data members to keep up information about each order including an order number, the number of items purchased from each category, subtotals and the total amount of sales. In the main program you will create an ArrayList of order objects to keep up with all of the orders. After each order is completed, create a new object to represent that order and add all the information about that order to the new object. Then add the new object to our ArrayList of order object

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions