Suggested steps for implement

$24.99 $18.99

Copy the function prototypes and two functions from instructions into your program. Comment out prototypes of functions not yet defined. In main, set up your menu loop. See menu.cpp for a suggested pattern (but call the displayMenu function). Set up your switch to output a statement for each case for now. If a wrong choice…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)
  1. Copy the function prototypes and two functions from instructions into your program. Comment out prototypes of functions not yet defined.

  2. In main, set up your menu loop. See menu.cpp for a suggested pattern (but call the displayMenu function). Set up your switch to output a statement for each case for now.

  1. If a wrong choice is entered, output: “Please enter 1, 2, 3, 4, or 5: “

  2. Declare the Result struct

  3. Define the displayDataset function (call displayHeader, etc.)

  1. In main:

    • create an array of Result.

    • initialize it to the first three race results in the dataset (remove before step 10).

    • have a count variable, set to 3.

    • call displayDataset from cases 1 and 2 of the switch, make sure it displays properly.

(you could skip ahead to step 10 now if you prefer)

  1. Define linearSearchByName

    • call it from case 3 of the switch

    • you will need to input the name from the user using getline(cin, variable). But you will need to do cin.ignore, or cin >> ws; before the getline.

  1. Define sortByNumber

    • call it from case 1 of the switch

  1. Define readDataset function:

    • copy dataset.txt to your directory.

    • in main:

  1. create an ifstream variable for dataset.txt (include fstream) and open it in main!!

  1. call readDataset from main before the display (set count to 0 first)

  1. hint: temporarily output each result from readDataset to find any

problems

  1. ctrl-C if infinite loop.

    1. implement sortByDistanceTime

      • call it from case 2 of the switch

  1. implement binarySearchByNumber

      • call it from case 4 of the switch

Suggested steps for implement
$24.99 $18.99