Lesson 10 Debugging Exercise.docx - Lesson 10 Debugging...

This preview shows page 1 - 2 out of 4 pages.

Lesson 10 Debugging Exercise Chapter 7: “File Handling and Applications (Part 2)” Examine the pseudocode that follows the introductory comments, then find and correct all the bugs. Correct the code in this file, and be sure to clearly highlight the corrections. 1. Debugging Each time a salesperson sells a car at the Pardeeville New and Used Auto Dealership, a record is created containing the salesperson’s name and the amount of the sale. Sales of new and used cars are kept in separate files because several reports are created for each sale type. However, management has requested a merged file so that all of the sales, whether the vehicle was new or used, are displayed together for each salesperson. The following code is intended to merge the files that have already been sorted by salesperson ID number. _____________________________________________________________________________________ start Declarations string newSalesperson num newAmount string usedSalesperson num usedAmount string bothAtEof = "N" string HIGH_NAME = "ZZZZZ" InputFile newSales InputFile usedSales OutputFile allsales

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture