Question: Hello! I require some help with a Java Project being done in Eclipse IDEW Software. If this could be done today, I would greatly appreciate

Hello! I require some help with a Java Project being done in Eclipse IDEW Software. If this could be done today, I would greatly appreciate it!
____________________________________________________
Task 1: Binary Files
1a) Write a program that prompts the user to enter sales data for each day of the week (7 entries in total) and then writes this data to a binary file.
Your program should perform the following steps:
- Prompt the user to enter sales data for each day of the week. For simplicity, you can assume that the sales data entered will be integers representing the amount of sales for each day.
- Store the entered sales data in an array or a similar data structure.
- Write the sales data to a binary file.
1b) Write another program that reads the sales information from the binary file created in Part 1 and calculates the average sales for the week.
Your program should perform the following steps:
- Read the sales data from the binary file.
- Calculate the total sales for the week by summing up all the sales data.
- Calculate the average sales by dividing the total sales by the number of days (7 in this case).
- Display the average sales to the user.
Task 2: Random Access Files
2a) Write a program that allows the user to input letter grades for 5 classes and writes these grades to a random access file.
Your program should follow these steps:
- Prompt the user to enter letter grades for 5 classes. You can assume that each grade will be a single character representing the letter grade (e.g.,'A','B','C', etc.).
- Store the entered letter grades in a suitable data structure.
- Write the letter grades to a random access file, where each grade is stored at a specific position corresponding to its class (e.g., the grade for the first class at position 0, the grade for the second class at position 1, and so on).
2b) Write another program that reads the letter grades from the random access file created in Part 1 and retrieves the letter grade for the third class.
Your program should perform the following steps:
- Open the random access file for reading.
- Seek to the position in the file corresponding to the third class.
- Read and retrieve the letter grade stored at that position.
- Display the retrieved letter grade to the user.
____________________________________________________
If the program could be separated into different .java files, that would be awesome.
Task1a: WriteSales.java
Task1b: ReadSales.java
Task2a: WriteGrades.java
Task2b: ReadGrades.java
Any help would be greatly appreciated!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!