Question: Recursion vs Iterative functions. For this assignment you will make a Vehicle class with two recursive member functions. a) Implement overloaded member functions called binSearchRec,the

 Recursion vs Iterative functions. For this assignment you will make a

Recursion vs Iterative functions. For this assignment you will make a Vehicle class with two recursive member functions. a) Implement overloaded member functions called binSearchRec,the recursive binSearchRec algorithm is presented in this chapter, starting on page 68 for an array of vehicles. Usea vector instead of an array. Sort by make then call a recursive function to do a binary search which lists out the make, model and year for the first year found (or report accordingly) that matches the for a user input. then start a new sort Sort by model then call a recursive function to do a binary search which lists out the make model and year for the first year found (or report accordingly) that matches the for a user input. Read in the vehicles from a vehicle file (vehiclein.txtthat has a year, make, and model. You have a choice of reading in an integer and two strings OR reading in 3 strings and converting the year to an int. Remember that between a stream operator () and a getline, you need a ignore (e.g infile.ignore)) You should not use a .ignore) between a getline and a

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 Databases Questions!