Question: ffQuestion 1 Referring to Question 1. write a prograrn in another file named then-rain . opp in order to execute the classes created in Question

 \f\fQuestion 1 Referring to Question 1. write a prograrn in anotherfile named then-rain . opp in order to execute the classes createdin Question 1. The program should prompt users to input the typeof vehicle (car or motorcycle) before proceeding to ask for first name,

\f\fQuestion 1 Referring to Question 1. write a prograrn in another file named then-rain . opp in order to execute the classes created in Question 1. The program should prompt users to input the type of vehicle (car or motorcycle) before proceeding to ask for first name, last name, and vehicle price. Your program will loop to process multiple vehicles until value zero {0] is keyed in as a sentinel value to stop the program. Your main {1: function should contain the following elements. 3 o vehicle *t 1130]; *t [1130] is a class vehicle pointer array that instantiate list of objects from both clams car and class metereyele. o Sufcient variables to preliminaryI store values for type of vehicle, first name, last narne, vehicle price, loop counters and sentinel value. In Variable type is used for vehicle type selection. If type == 1, an object pointer for class ear is created, while if type == 2. an object pointer for class motorcycle is created. You may use any preferred selection structure. In Member function di splay { 1: will be called before the end of each loop. Refer to Figure CI for the nal output. \f

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