Model an ideal transformer where V1/V2 = N1/N2 and i1/i2 = N2/N1 provide functions iOut and vOut to calculate current or voltage out provide setI1forI2 (etc) to calculate internal variables for a given output
What will be an ideal response?
```
#include
using namespace std;
class Transformer {
public:
Transformer() {} // default constructor
Transformer(int, int, double, double); // construct with N1 N2 V1 i1
double vOut() const; // calculates voltage out
double iOut() const; // calculates current out
void setN1forV2(double); // set a variable for a given output
void setN2forV2(double);
void setV1forV2(double);
void setI1forI2(double);
void setN1forI2(double);
void setN2forI2(double);
private:
int N1, N2;
double V1, i1;
friend istream& operator>> (istream&, Transformer&);
friend ostream& operator<< (ostream&, const Transformer&);
};
```
You might also like to view...
________ is a web based application
A) Google Drive B) StarOffice C) Calligra D) LibreOffice
A depreciation schedule records all of the following EXCEPT ________
A) accumulated depreciation B) calculation for each year's depreciation C) the date an asset was placed into service D) net book value
A potential spelling error is indicated by a(n)__________ wavy line.
Fill in the blank(s) with the appropriate word(s).
Internet security is divided into ____________________, or Web site areas, to which you can assign different levels of security.
Fill in the blank(s) with the appropriate word(s).