Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #include "Equipments.h"
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     const int maxEquipment = 10;
  9.  
  10.     Equipment* alk[maxEquipment];
  11.  
  12.     for(int i = 0; i < maxEquipment; i++)
  13.     {
  14.         alk[i] = new Equipment ( 0 , 0 );
  15.     }
  16.  
  17.     alk[0] = new Printer(123, 3300, 45000);
  18.     alk[1] = new Monitor(124, 34000, 2, 21);
  19.     alk[2] = new Equipment(125, 35000);
  20.     alk[3] = new Monitor(126, 23000, 4, 19);
  21.     alk[4] = new Printer(127, 7000, 13000);
  22.     alk[5] = new Monitor(128, 55000, 7, 22);
  23.  
  24.     for(int i = 0; i < maxEquipment; i++)
  25.     {
  26.         alk[i]->Print();
  27.     }
  28.  
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement