Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class electronics{
- float climatic_category, overvoltage_category, under_load, insulation_coordination;
- float cycle_of_operation, pollution_degree, type_test, pull_out_force;
- float basic_test, over_volltage, upper_limitting, rated_connector;
- public:
- void set(float cc, float oc, float ul, float ic){
- climatic_category = cc;
- overvoltage_category = oc;
- under_load = ul;
- insulation_coordination = ic;
- }
- void class_0(){
- if(climatic_category == 1 && overvoltage_category == 1 && under_load == 1){
- if(insulation_coordination == 1){
- cout << "ГОСТ стандарты." << endl;
- }
- }
- }
- void class_1(){
- climatic_category +=2;
- overvoltage_category +=2;
- under_load +=2;
- insulation_coordination +=2;
- cout << "Допустимые погрешности: ";
- cout << climatic_category << " " << overvoltage_category << " " << under_load;
- cout << " " << insulation_coordination << endl;
- }
- void set1(float cfo, float pd, float tt, float pof){
- cycle_of_operation = cfo;
- pollution_degree = pd;
- type_test = tt;
- pull_out_force = pof;
- }
- void class_2(){
- if(cycle_of_operation == 1 && pollution_degree == 1 && type_test == 1){
- if(pull_out_force == 1){
- cout << "ГОСТ стандарты." << endl;
- }
- }
- }
- void class_3(){
- cycle_of_operation +=1;
- pollution_degree +=1;
- type_test +=1;
- pull_out_force +=1;
- cout << "Допустимые погрешности: ";
- cout << cycle_of_operation << " " << pollution_degree << " " << type_test << " ";
- cout << pull_out_force << endl;
- }
- void set2(float bt, float ov, float ul, float rc){
- basic_test = bt;
- over_volltage = ov;
- upper_limitting = ul;
- rated_connector = rc;
- }
- void class_4(){
- if(basic_test == 5 && over_volltage == 5 && upper_limitting == 5 && rated_connector == 5){
- cout << "ГОСТ стандарты." << endl;
- }
- }
- void class_5(){
- basic_test +=5;
- over_volltage +=5;
- upper_limitting +=5;
- rated_connector +=5
- cout << "Допустимые погрешности: ";
- cout << basic_test << " " << over_volltage << " " << upper_limitting << " ";
- cout << rated_connector << endl;
- }
- };
- int main() {
- electronics elc;
- elc.set(1,1,1,1);
- elc.class_0();
- elc.class_1();
- elc.set1(1,1,1,1);
- elc.class_2();
- elc.class_3();
- elc.set2(5,5,5,5);
- elc.class_4();
- elc.class_5();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement