// elekter1.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "tarbija.h" #include "jadayhendus.h" #include using namespace std; int main() { jadayhendus j1; j1.lisa(new Tarbija(220, 0.25)); j1.lisa(new Tarbija(110, 0.25)); cout << j1.koguTakistus() << endl; cout << j1.kysiI(5) << " " << j1.kysiN(5) << endl; cout << j1.kasLubatudPinge(6) << endl; } int main_0() { Tarbija t1(110, 0.5); std::cout << t1.kysiR() << endl; cout << t1.kysiI(5) << endl; cout << t1.kysiN(5) << endl; cout << "suurim pinge " << t1.suurimLubatudPinge() << endl; if (t1.kasLubatudPinge(8)) { cout << "sobib" << endl; } else { cout << "ei sobi" << endl; } return 0; }