20.9k views
0 votes
The attached file "transactions.txt" contains records of sales transactions, where a transaction record consists of the date, time and the value of the transaction. Each transaction record is stored on three consecutive lines with the date in the first, the time in the second, and the value (i.e. dollar amount) in the third. Develop an algorithm in the form of a Raptor flowchart to compute and display the total value of the transactions that were completed at 15:00:00. In addition, display the dates of these transactions, i.e. those completed at 15:00:00. Note that transaction times are recorded in 24-hour time format______

1 Answer

3 votes

Final answer:

To compute and display the total value of transactions completed at 15:00:00, follow this algorithm and flowchart.

Step-by-step explanation:

To compute and display the total value of transactions completed at 15:00:00, you can follow this algorithm:

  1. Initialize a variable 'totalValue' to 0 to keep track of the total value.
  2. Open the 'transactions.txt' file.
  3. While reading the file, do the following steps for each transaction:
  • Read the date value from the file.
  • Read the time value from the file.
  • Read the transaction value from the file.
  • If the time value is equal to '15:00:00', add the transaction value to 'totalValue'.
Display the value of 'totalValue'.

Below is a flowchart representation of the algorithm:

User Resle
by
7.6k points