Posted: Thu Jun 05, 2008 6:46 am Post subject: Can someone help me with this? +rep
I have no idea how to do this assignment. Can someone help me please?
Company Sales
Future Shop requires a program to track their weekly sales. They hire you to create a Java program to track their sales. The program will read a file (sales.txt) that contains each weekly sale. The first line of the file will indicate the number of weeks included while each subsequent line indicates the sales for each week.
Another employee has already started the program and has set up the Main Menu system. To complete the program you will need to add the following necessary code:
• When the program starts, it will automatically load the sales file.
• Menu 1 – List all the sales values from the file
• Menu 2 – Calculate the total sales value
• Menu 3 – Calculate the average sales value
• Menu 4 – Calculate the difference between the highest weekly sale and the lowest weekly sale. You need to display which week is the highest and which week is the lowest.
• Menu 5 – Exit the program
The program will read in each weekly sale value and store them in an array. To create the program you must include the following methods in your program. You must determine the parameters and return value for each method.
• loadSales - reads in all the sales from the file and stores them in an array
• displaySales – displays all the sales from the file and stores them in an array
• getTotalSales – calculates and returns the total sales
• getAverageSales – calculates and returns the average sales for the number of weeks specified
• getDifference – calculates and returns the difference between the highest weekly sale and the lowest weekly sale _________________
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum