For downloading more tutorials visit – http://homework-tutorials.com/product/comp-220-ilab-4-composition-lab-report-and-source-code/
This lab requires you to use C++ class composition to implement a single pole-filter design program. The program will allow the user to specify resistor and capacitor values and filter type.
Once all the user parameters are specified, the program will return the cutoff frequency values for the filter. Composition may be thought of as a has-a relationship for objects, as compared to inheritance, which may be described as an is-a relationship for objects.
You are required to use two component classes: one for a resistor object and one for a capacitor object. You are then to define and implement a filter class that will contain one object of each the resistor and the capacitor classes in order to create the filter and its characteristics.
The Resistor class
Comments