Question: c++ code please 8.3 Design a Coil class that is used to store and process data for a coil, such as current, voltage, and the

8.3 Design a Coil class that is used to store and process data for a coil, such as current, voltage, and the number of turns. The member functions should include a constructor with arguments and functions that are used to get, store, and output values of a coil. Design another class called Transformer that is composed of the two objects of the Coi I class - i.e., the primary and secondary coils as shown in Figure 8.17. The Trans former class should have the following member functions: 1. A constructor function with arguments 2. A function that computes and displays the turns ratio N 3. A function that computes and returns the secondary current if given the turns ratio and primary current 4. A function that computes and returns the secondary voltage if given the turns ratio and primary voltage Design the main() function that is used to test the Transformer class. It should create a composed object first and then call the appropriate member functions to process the data of a transformer. Figure 8.17 Ideal transformer. The relationships between primary and secondary quantities in an ideal transformer are as follows: N=n21,V2=NV1,I2=I1/N, where V1 and I1 are primary voltage and primary current; V2 and I2 are secondary voltage and secondary current; and n1 and n2 are numbers of turns of the primary and secondary coil, respectively
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
