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:
[2pts] countRecords: Counts and returns the number of records (lines) in the file.
[1pt] check: Determines if the starting day and ending day are valid:
a. starting day ending day
b. starting day 1
c. ending day = number of records in the file
[2pts] printProfits: Populates and prints the profit for each day within a specified range of record
lines.
[2pts] getTotalProfit: Calculates and returns the total profit for a list of days within a specified
range of record lines.
[1pt] main: Utilizes the application.
Feel free to refer to the provided flowchart as a guide when implementing these methods.
Utilize the provided flowchart to create a Java

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!