Question
SALES ANALYSIS JAVA The file SalesData.txt , the data below, contains the dollar amount of sales that a retail store made each day for a
SALES ANALYSIS JAVA
The file SalesData.txt, the data below, contains the dollar amount of sales that a retail store made each day for a number of weeks. Each line in the file contains seven numbers, which are the numbers for one week. The numbers are separated by a comma. The following line is an example from the file:
1245.67,1490.07,1679.87,2371.46,1783.92,1461.99,2059.77 2541.36,2965.88,1965.32,1845.23,7021.11,9652.74,1469.36 2513.45,1963.22,1568.35,1966.35,1893.25,1025.36,1128.36
Write a menu driven program named SalesAnalysis that has a menu with the following options below. When you read the data into memory, it is up to you how you store it. File locations should be chosen from a FileDialogBox or JFileChooser.
- Read the data from the file
- Calculate and print the average sales for each week (add up the seven days for a week and divide by seven)
- Store the values from the bullet point above into a text file, one per line so there should be one value in the file for each week
- Calculate and print the average daily sales for each week (add up each day of the week sets and divide by the number of weeks so you will have seven answers outputted one for each day of the week.
- Exit
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started