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 : Binary Files
a Write a program that prompts the user to enter sales data for each day of the week 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.
b Write another program that reads the sales information from the binary file created in Part 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 in this case
Display the average sales to the user.
Task : Random Access Files
a Write a program that allows the user to input letter grades for classes and writes these grades to a random access file.
Your program should follow these steps:
Prompt the user to enter letter grades for classes. You can assume that each grade will be a single character representing the letter grade egABC 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 eg the grade for the first class at position the grade for the second class at position and so on
b Write another program that reads the letter grades from the random access file created in Part 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.
Taska: WriteSales.java
Taskb: ReadSales.java
Taska: WriteGrades.java
Taskb: 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
