You are required to create a C++ program that interactively accepts and stores the information of used handphones for sale as shown in the table below.
Make Model Price Condition
------ ----- --- --------
Samsung S2 500 B
Apple Iphone5 580 B
Apple Iphone6 1200 A
Samsung Note10 4000 A
Declare an array of 4 structures named Handphones in your program. Using the data type declared in your program:
- Write a function named storeInfo() that passes as an argument, an array of structure to capture the information of each car entered by the user.
- In the same program, create a function named sortInfo() to sort the info based on the price of the handphones. Your array of structure should be accessed using pointer variables.
- Write a function call displayInfo(), to display the information keyed in.
The sample code is given in a file called handphone.cpp. There is a logical errors with the code, which makes the sorting work incorrectly, figure it out.