By DePaul Dimadis
Choose your prefered Language: greek_flag uk_flag

A wind turbine has 10 subsystems (electrical, hydraulic, etc.). For each component belonging to a subsystem, the following data is known:
1. part code (int) [limits 1-99]
2. subsystem code to which it belongs (int) [limits 1-10]
3. Average time between two consecutive failures in days (positive int)
4. Repair / replacement date in the form of SMM (MM = month, EU = year). Permissible values: 1 <= MM <= 12 for the months and for the year the range [2007-2016].
Write a class named wind_turb and private members - data above.
In the main () function:
1. set a table of objects of the N-class wind_turb (N = known, 100 <= N <= 999) and initialize all the positions in the table using default constructor, setting zero values ​​for all numerical data.
2. Import data into the wind_turb object matrix using the constructor of the class, using only random numbers, within the given values ​​limits. Each component may appear more than once in each subsystem and may be present in more than one subsystem.
3. Using all the objects in the table:
a. Find and display for each year [2007-2016] the number of repairs / replacements for each subsystem.
b. Find and display for each subsystem the component with the smallest and greatest average time between two successive failures. In case there are more than one components, everything is displayed.
c. Create and display a one-dimensional dynamic array that includes, in pairs, the component code and the mean time between two successive failures for a subsystem whose value is given to the main () function via the cin command.