Question: Utilize the provided flowchart to create a Java program that reads income and expenses data from the file inFile.txt for multiple days. Each line
Utilize the provided flowchart to create a Java program that reads income and expenses data from the file
"inFile.txt for multiple days. Each line in the file represents a record, with two numbers corresponding to
the income and expenses for a given day. The program should include the following methods:
pts countRecords: Counts and returns the number of records lines in the file.
pt check: Determines if the starting day and ending day are valid:
a starting day ending day
b starting day
c ending day number of records in the file
pts printProfits: Populates and prints the profit for each day within a specified range of record
lines.
pts getTotalProfit: Calculates and returns the total profit for a list of days within a specified
range of record lines.
pt main: Utilizes the application.
Feel free to refer to the provided flowchart as a guide when implementing these methods.
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
