problem resolved
I am starting Java and discovered some problems.
There is a file SalesData.txt that contains the amount of sales in dollars that a retail store makes every day for several weeks. Each line in the file contains seven numbers, which are daily sales for one week. Numbers are separated by a comma. The following is an example from a 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
I converted String to Double and tried to compute:
- Total sales for each week.
- The average daily sales for each week.
- Total sales for all weeks
- Average weekly sales
My question is how Java can define the first line as week 1, the second line as week 2, etc. And calculate the amount. The following is the syntax: