Advertisement
evcamels

lr2

Nov 17th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.80 KB | None | 0 0
  1.  
  2. #include <iostream>
  3. using namespace std;
  4. class electronics{
  5.     float climatic_category, overvoltage_category, under_load, insulation_coordination;
  6.     float cycle_of_operation, pollution_degree, type_test, pull_out_force;
  7.     float basic_test, over_volltage, upper_limitting, rated_connector;
  8. public:
  9.     void set(float cc, float oc, float ul, float ic){
  10.         climatic_category = cc;
  11.         overvoltage_category = oc;
  12.         under_load = ul;
  13.         insulation_coordination = ic;
  14.     }
  15.     void class_0(){
  16.         if(climatic_category == 1 && overvoltage_category == 1 && under_load == 1){
  17.             if(insulation_coordination == 1){
  18.                 cout << "ГОСТ стандарты." << endl;
  19.             }
  20.         }
  21.     }
  22.     void class_1(){
  23.         climatic_category +=2;
  24.         overvoltage_category +=2;
  25.         under_load +=2;
  26.         insulation_coordination +=2;
  27.         cout << "Допустимые погрешности: ";
  28.         cout << climatic_category << " " << overvoltage_category << " " << under_load;
  29.         cout << " " << insulation_coordination << endl;
  30.     }
  31.     void set1(float cfo, float pd, float tt, float pof){
  32.         cycle_of_operation = cfo;
  33.         pollution_degree = pd;
  34.         type_test = tt;
  35.         pull_out_force = pof;
  36.     }
  37.     void class_2(){
  38.         if(cycle_of_operation == 1 && pollution_degree == 1 && type_test == 1){
  39.             if(pull_out_force == 1){
  40.                 cout << "ГОСТ стандарты." << endl;
  41.             }
  42.         }
  43.     }
  44.     void class_3(){
  45.         cycle_of_operation +=1;
  46.         pollution_degree +=1;
  47.         type_test +=1;
  48.         pull_out_force +=1;
  49.         cout << "Допустимые погрешности: ";
  50.         cout << cycle_of_operation << " " << pollution_degree << " " << type_test << " ";
  51.         cout << pull_out_force << endl;
  52.     }
  53.     void set2(float bt, float ov, float ul, float rc){
  54.         basic_test = bt;
  55.         over_volltage = ov;
  56.         upper_limitting = ul;
  57.         rated_connector = rc;
  58.     }
  59.     void class_4(){
  60.         if(basic_test == 5 && over_volltage == 5 && upper_limitting == 5 && rated_connector == 5){
  61.             cout << "ГОСТ стандарты." << endl;
  62.         }
  63.     }
  64.     void class_5(){
  65.         basic_test +=5;
  66.         over_volltage +=5;
  67.         upper_limitting +=5;
  68.         rated_connector +=5
  69.         cout << "Допустимые погрешности: ";
  70.         cout << basic_test << " " << over_volltage << " " << upper_limitting << " ";
  71.         cout << rated_connector << endl;
  72.     }
  73.    
  74. };
  75. int main() {
  76.     electronics elc;
  77.     elc.set(1,1,1,1);
  78.     elc.class_0();
  79.     elc.class_1();
  80.     elc.set1(1,1,1,1);
  81.     elc.class_2();
  82.     elc.class_3();
  83.     elc.set2(5,5,5,5);
  84.     elc.class_4();
  85.     elc.class_5();
  86.     return 0;
  87. }
  88.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement