Question: Please solve within 30min using C++ . Question 5 ( 20 marks) Electric elevators are a type of vertical transportation devices that move people or
Question 5 ( 20 marks) Electric elevators are a type of vertical transportation devices that move people or goods between floors. A file named "elevator.txt" contains a set of available elevators in the market and their installation cost (max 200 records). Each line in the file consists of elevator type(string), number of floors (int), and its installation cost (double). Write a program that reads the data from file into 3 parallel arrays. Your program will perform the following (see sample file and screen output below): 1. Display all elevators types and the number of floors. 2. Display the average installation cost for all elevators. 3. Display the elevator type with the cheapest installation cost. 4. Ask the user to enter price range, then display all elevators information within the user price. Also, display how many elevators found to match user price range. 5. Follow sample Screen output given below. elevators.txt (Input file) Sample Screen Output Floors 4 6 Cable 4 Chain 6 Traction 8 Pneumatic 6 Hydraulic 20 Type Cable Chain Traction 8 6500 2500 20000 7000 45000 Average installation cost: 12600 Chain is the cheapest with cost 2500 Enter price range: 8000 Type Floors Cost Cable 4 6500 Chain 6 2500 Pneumatic 6 7000 7 elevators match your price range
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
