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?

```
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&);
};
```

Computer Science & Information Technology

You might also like to view...

The ________ is the location within which the name is recognized without qualification

Fill in the blank(s) with correct word

Computer Science & Information Technology

You are examing a Linux box with multiple email accounts configured. You know which of the accounts holds the message you seek and you even have a few key words that you know are contained in the message. Which of the following utilities will you use to find those messages?

a. STRINGS b. SU c. BIND d. GREP

Computer Science & Information Technology