In earlier chapters you have developed programs for Cost Is
In
 earlier chapters, you have developed programs for Cost Is No Object—a car
 rental service that specializes in lending antique and luxury cars to clients
 on a short-term basis. Create a class whose main() method assigns cars and rental fees to customers for the current day. The
 program continuously prompts for input data until the user indicates the end of
 the data has been reached. Write just pseudocode.
Input data includes the following:
· Customer name
· Code for desired car type—A for Antique Car or L
 for Luxury Car
· Number of days for the rental
In the main() method, create four parallel arrays. The first
 three contain car descriptions, daily rental fees, and the car-type code, as
 follows:
Description
Daily Fee
Code
1967
 Ford Mustang
$65
A
1922
 Ford Model T
$95
A
2008
 Lincoln
 Continental
$135
L
2002
 Lexus
$140
L
2007
 BMW
$160
L
1910
 Mercer Runabout
$165
A
2009
 Mercedes Benz
$200
L
1930
 Cadillac V-16
$205
A
The fourth array contains an
 indicator that specifies whether the car is already rented. At the start of the
 program, none of the cars is rented.
After the user is prompted for the
 first customer’s data, pass the customer’s name, car type requested, and the
 four arrays of data to a method named fulfillRequest().
 The method finds the first available car of the correct type, displays its
 description and rental fee, and changes the rental indicator to show the car is
 no longer available. If no cars are available of the type requested by the
 customer, display an appropriate message. The method returns the daily rental
 fee unless no cars of the correct type are available, in which case the method
 returns 0. The main() method
 displays the daily rental fee.
If a car of the correct type is
 available, the main() method
 should pass the daily rental fee, the number of rental days, and the car type
 requested to a method named calculateContractAmount().
 The contract amount is the daily fee times the number of days plus tax. The tax
 is 6 percent of the rental price for an antique car and 8 percent of the price
 for a luxury car. The method returns the amount of the contract to the main() method, where it is displayed.
Before the user is prompted for
 data for any customer after the first one, determine whether any cars are still
 available for rent. If no more cars are available, display an appropriate
 message and end the program.
| Description | Daily Fee | Code | 
| 1967 | $65 | A | 
| 1922 | $95 | A | 
| 2008 | $135 | L | 
| 2002 | $140 | L | 
| 2007 | $160 | L | 
| 1910 | $165 | A | 
| 2009 | $200 | L | 
| 1930 | $205 | A | 
Solution
#ifndef endLocation
 #define endLocation
 #include \"myLinkedlist.h\"
 #include \"myString.h\"
 class endLocation
 can use atoi
 int travelCost; // can use atoi
 public:
 endLocation();
 endLocation(String, int, int);
 endLocation(endLocation& rhs);
 void setName(String);
 void setTime(int);
 void setCost(int);
 String getName();
 int getTime();
 int getCost();
 };
#endif // endLocation
 //.cpp implementation
 endLocation::endLocation()
endLocation::endLocation(endLocation& rhs)
void endLocation::setName(String inputName)
void endLocation::setTime(int inputTime)
void endLocation::setCost(int inputCost)
String endLocation::getName()
 come locationName;
 }
 int endLocation::getTime()
 come travelTime;
 }
 int endLocation::getCost()
 come travelCost;
 }
 
 Here is my main
 
 int main( int argc, char* const argv[] )
 range of lines here
 for(int i = 0; i < num_lines; ++i)dissect and store all strings
 size = findIndex(line, \'|\');
 strncpy(name, line, size);
 index = size + 1;
 size = findIndex(line + index, \'|\');
 strncpy(time, line + index, size);
 index += size + 1;
 size = findIndex(line + index, \'|\');
 strncpy(cost, line + index, size);
 }
 in.close();
 }
 else




