Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Java: One-Dimensional Arrays - A store that sells 3 types of pies, and will like to know their daily sales for all their products.

Using Java:

One-Dimensional Arrays - A store that sells 3 types of pies, and will like to know their daily sales for all their products. The store owner wants to know the total sales each day and for the whole week. Using a method, write a program that allows the user to input daily worth of data for each product. The purchase price of each product is

Apple Pie: $3.0 Cherry Pie: $4.0 Blueberry Pie: $2.0

Create an array for each day, the store opens 5 days a week. Each array length is 3 since the store sells types of product..

Based on the user inputs for each product --print out the total sales for Monday, Tuesday, ...

Sample input Enter the number of Apple, Blueberry, and Cherry on Monday: 14 21 5 Enter the number of Apple, Blueberry, and Cherry on Tuesday: 14 21 59 Enter the number of Apple, Blueberry, and Cherry on Wednesday: 14 21 20 Enter the number of Apple, Blueberry, and Cherry on Thursday: 14 21 27 Enter the number of Apple, Blueberry, and Cherry on Friday: 14 21 31

Sample output Total sales for Monday was: $243.00 Total sales for Tuesday was: $540.00 Total sales for Wednesday was $192.00 Total sales for Thursday was $192.00 Total sales for Friday was $192.00 Your combine total sales was $975.00

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_2

Step: 3

blur-text-image_3

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

C++ Database Development

Authors: Al Stevens

1st Edition

1558283579, 978-1558283572

More Books

Students also viewed these Databases questions

Question

4 . Malware and spyware

Answered: 1 week ago