Question: PLEASE HELP ASAP. java program here's my attempt - Using a text editor such as notepad, create a file that contains the amounts of sales


- Using a text editor such as notepad, create a file that contains the amounts of sales for 30 days. - The file should simply contains 30 rows and each row with an amount such as 1964.22 - Create a java program that: - Declare a constant variable to hold the number of sales day (which is 30). - Opens this file - It calculates and displays the total sales and average daily sales. - Your program should have 3 methods: - getFileName - getTotalSales - displayResults - At this time we are not doing any validation. We assume the user enters correct filename. Sample of sales file (image shows partial list) Sample output Enter the name of the file containing 30 days of sales amounts. Monthlysales. txt The total sales for the period is $56,437.42 The average daily sales were $1,881.25 Q45 Scanner keyboardenew Scanner(System. in); 9. Monthlysales b return total; //DISPLAYING OUTPUT System.out,println("The total sales for the period is"); System. out, println("The average dally sales were"); y Problems = lavadoc B Declaration Console X (2)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
