2. AC Circuit Simulation
Design a class ‘Complex’ for complex numbers with suitable data members and member functions.
It should overload the following operators for the corresponding operations in complex numbers: +
(add), - (subtract), * (multiply) and / (divide).
It should also have member functions for accessing the value of the complex number both in
Cartesian form and polar form.
[50 marks]
Hence, write a program with objects of the above Complex class to calculate the voltage across and
the current through each component in one of the following AC circuits (to be assigned by lecturer),
over a range of supply voltage frequencies. The supply voltage is a 1-volt AC signal.
1. R-L-C Series Circuit
2. R-L-C Parallel Circuit
3. R in Series with Parallel L-C Circuit
4. L in Series with Parallel R-C Circuit
5. C in Series with Parallel R-L Circuit
All values should be displayed in polar form with two decimal-points and right-adjusted.
(See sample console output next page
2007-01-05
03:09:01
·
2 answers
·
asked by
nadi m
1
in
Science & Mathematics
➔ Engineering