By DePaul Dimadis
Choose your prefered Language: greek_flag uk_flag

An industrial unit inspects its mechanical equipment in accordance with the instructions of the machine manufacturers. For each machine and for each inspection carried out between 2007 and 2016 the following data is known: (NOTE: for each machine there are many inspections in each year)
- Machine code - int integer positive number [1-99] (NOTES: 1. there are not all codes from 1-99, ie the exact number of machines is not known and must be specified if required. Also, if requested, all existing machine codes should be specified).
- Control date in the form of SMEs (MM = month, EU = year). Permissible values: 1 <= MM <= 12 and for the year the range [2007-2016].
- Engine status at 10 different inspection points with permissible values ​​0 and 1 (0 → good condition and 1 poor condition).
Write a class named i_mach and private members - data above.
In the main () function:
1. set a table of objects of the N-class i_mach class (N = known, 100 <= N <= 999) and initialize all positions in the table using default constructor, setting zero values ​​for all numerical data.
2. Enter data into the i_mach object table using a constructor of the class, using only random numbers, within the limits of values ​​given. Because inspections are common, each machine will appear more than once a year.
3. Using all the objects in the table:
a. Find and display the number of inspections for each machine code.
b. Find and display for each year the number of inspections per machine and the number of 1 inspections received and the 10 different inspection points in that year. The machine code is entered via the cin command on main ().
c. Create and display a one dimensional dynamic table that includes, in pairs, the machine code and the year of inspection each time the number of 0 is greater than 5.

Create a descending class called new_i_mach that includes additional private members - data:
  The cost of inspecting the status of each of the 10 points of each machine (positive double numbers).
Then write:
the constructor function for importing data into an object of the new_i_mach class using only random numbers and setting the corresponding upper rand values ​​of the rand () function yourself.