By DePaul Dimadis
Choose your prefered Language: greek_flag uk_flag

A production unit has stocks of N different products (consider N as a constant at the start of the program). The stocks of each product have been produced gradually, on different generic dates. For each stock of a product, the following are known:
• Product code (allowed values ​​1 to N, integers)
• Inventory quantity (positive integer)
• Production date (integer number in SME format where EU = year and MM = month number (1-12) (eg 816 August 2016) Acceptable years 2007 to 2016.
• Cost of maintaining the stock quantity (positive integer long type number)
Write the definition of a class with the stock name with data-members as above.
The main () function:
1. create a table of objects named alpha of the stock class M size (the value of M being set as constant at the beginning of the program). It will then enter data in the table

objects ONLY using a constructor function with the necessary validity validity checks. Appropriate use of random number generator is recommended.
2. find and display for each product the total conservation cost as well as the total quantity of the stock.
3. the plant should cease production of a product if the total quantity of stocks produced before 1/11/2016 exceeds 50% of its total stock. Using a repetitive process, on all objects in the table, find and display (if any) the product codes for which production should be stopped immediately.(NOTE: As many functions as members of the stock class are required when developing the program can be written at any point using the appropriate notations)
create a descending class called new_stock that includes additional private members - data:

• the expiry date of the production quantity, in the same form of SME
• production unit cost of product (float positive number)
1. Write the constructor function to input the data to an object of the resultant class new_stock WITH THE NECESSARY VALIDITY CONTROL.
2. Write the new_stock class function that returns for a product the total output expired based on the current month (1113) along with the corresponding production cost. The product code will be an input argument for the function.
3. Set the main () function of a table of objects with a beta name of the L-class new_stock (the value L must be set at the beginning of the program, it must be L <= M).
4. Import data into the beta table using a constructor using (deleting) the first L objects in the alpha table and the random number generator for the extra data.
5. Using a iterative process, on all items in the beta table, find and display (if any), for each product separately, the total quantity expired based on the current month (1117) and the corresponding total cost production.