is nothing private in Python but try to not access the attributes directly from outside the classes).The int attributes will represent whole part (or currency note value) and fractional part (or currency coin value) such that 100 fractional parts equals 1whole part.The string attribute will represent the currency name. B. Create a C2Dderived/inherited class with one additional non-public double attribute to represent the conversion factor from/to US Dollar.The value of the conversion factor can be defaulted in the class definition based on 1 USD = 1.36 C2D or 1 C2D = 0.74 USD. C.In your two currency classes, add public methods for the following: Default Construction (i.e. no parameters passed) Construction based on parameters for all attributes Copy Constructor and/or Assignment, as applicable to your programming language of choice Destructor, as applicable to your programming language of choice Setters and Getters for all attributes Adding two objects of the same currency Subtracting one object from another object of the same currency Comparing two objects of the same currency for equality/inequality Comparing two objects of the same currency to identify which object is larger or smaller Print method to print details of a currency object In your derived class only, methods to convert USD objects to C2D and vice versa D.Create a Wallet class with one attribute - an array of two USD references /pointers and the following methods to demonstrate polymorphism of the currencies: A default Constructor which sets the first element of the array to a zero value USD object the second element of the array to a zero value C2Dobject A Destructor, as applicable to your programming language of choice Methods to add or subtract currency objects appropriately using USD references / pointers, i.e. USD objects to/from the first element only and C2Dobjects to/from the second element only Do not write currency specific add/subtract methods as that would defeat the purpose of polymorphism.Methods to compare if the value of either element is greater or smaller than an input value using USD references only.This method can be called upon in the subtract method above as needed. A method to Print the values of the two elements in the Wallet E. In your main:Create a Wallet object Provide the user a main menu to add/ subtract/ compare the USD and C2D values in the Wallet as well as print the contents of the Wallet You can use a second level menu choice to allow the user to select currency type Based on user choice, create either USD or C2D objects as needed to perform the desired operations.The main menu should be run in a loop until the user selects the Exit option There is no sample output - you are allowed to provide user interactivity as you see fit and programs will be graded for clarity of interaction Things to remember: Create appropriately named code files - for the two Currency classes, for the Wallet class and any other helper code you might need. The file for your main should be named Lab1Main with the appropriate extension.Make any relevant assumptions that you may need but state them clearly in the corresponding code file. Remember to document your methods adequately - pre-post headers as well as any other relevant comments. Also, provide necessary pseudo code of the program in the main. See Design Tools and Documentation.pdf Preview the document for documentation help. Also, remember to include name blocks inall the code files.Grading: 25 pts - program as compiled by me from your code works as outlined above without needing any code change 20 pts - for the USD class 15 pts - for the C2D class and proper demonstration of polymorphism 15 pts - for the Wallet class and proper use of Currency polymorphism in your Wallet 25 pts -the main program including clear and intuitive interactivity
Fig: 1
Fig: 2
The switch in the circuit has been closed for a long time, and it is opened at t=0. Find v(t) for t>= 0. Calculate the initial energy stored in the capacitor. (a). When the switch is closed, calculate the value of Vc. (b). When the switch is opened, find the time constant. (c). Find v(t) for t>= 0. (d). Find p(t) for t>= 0. (e). Calculate the initial energy stored in the capacitor.
2.3 If, for a particular junction, the acceptor concentration is 10 17//cm 3' and the donor concentration is 10 16 cm², a) find the junction built-in voltage. b) Assume n; = 1.5×10 10. Also, find the width of the depletion region (W) and its extent in each of the p and n regions when the junction terminals are left open. c) Calculate the magnitude of the charge stored on either side of the junction. Assume that the junction area is 100 µm².
17 Assuming that the switch in Fig. 7.87 has been in position A for a long time and is moved to position Bat t = 0, Then at t = 1 second, the switch moves from B to C. Find Vc(1) for t>= 0.
Two electric circuits, represented by boxes A and B,are connected as shown in Fig. P1.14. The reference direction for the current i in the interconnection and the reference polarity for the voltage v across the interconnection are as shown in the figure. For each of the following sets of numerical values, calculate the power in the interconnection and state whether the power is flowing from A to B or vice versa. a) i 6 A,v= 30 V b) i -8 A,v = -20 V c) i 4 A,v = -60 V d) i = -9 A,v = 40 V
The manufacturer of a 1.5 V D flashlight battery says that the battery will deliver 9 mA for 40 continuous hours. During that time the voltage will drop from 1.5 V to 1.0 V. Assume the drop in volt-age is linear with time. How much energy does the battery deliver in this 40 h interval?
When a car has a dead battery, it can often be started by connecting the battery from another car across its terminals. The positive terminals are connected together as are the negative terminals. The connection is illustrated in Fig. P1.15. Assume the current iin Fig. P1.15 is measured and found to be 30 A. a) Which car has the dead battery? b) If this connection is maintained for 1 min, how much energy is transferred to the dead battery?
1.4 (a) A particular signal source produces an output of 40 mV when loaded by a 100-k2 resistor and 10 mV when loaded by a 10-k2 resistor. Calculate the Thé venin voltage, Norton current, and source resistance. (b) Using KVL, KCL and Thé venin theorem, compute the Thé venin voltage (Vth) at node A' and Thé venin resistance (Rth) equivalent of the circuit to the left below.
A 1000-MVA, 20-kV, 60-Hz, three-phase generator is connected through a 1000-MVA, 20-kV, Delta-Y transformer to a 345-kV circuit breaker and a 345-kV transmission line. The transformer rated voltage on the high side (Y side) is 345 kV. The generator reactances are X = 0.17 pu, X = 0.30 pu, Xa = 1.5 pu,and its time constants are T 0.05 s,T 1.0 s,TA = 1.10 s. The transformer series reactance is 0.1pu; transformer losses and exciting current are neglected. A three-phase short-circuit occurs on the line side of the circuit breaker when the generator is operated at rated terminal voltage and at no-load. The breaker interrupts the fault three cycles after fault inception. Determine (a) the subtransient current through the breaker in per unit and in kA RMS. (b) The RMS asymmetrical fault current the breaker interrupts,assuming maximum de offset. Neglect the effect of the transformer on the time constants.
Describe the behaviour of the following circuits. In particular explain how the behaviour of the circuits differ from what would be expected if the device was ideal. A voltage is applied to the circuit v(t) as shown. The input voltage is a ramp which starts from 0V at t = 0 and rises to 0.45V over 0.8 sec as shown in the table below. Determine the voltage across the diode and determine if the behaviour is linear. b) For the circuit in figure 3 below explain its function and determine the voltage at the output. (assume the op amp has a +- 12V supply) The input voltage is given in figure 2:-
1.3 The circuit shown below represents the equivalent circuit of an unbalanced bridge. It is required to calculate the current in the detector branch (R5) and the voltage across it. Although this can be done by using loop and node equations, a much easier approach is possible: Find the Thé venin equivalent of the circuit to the left of node 1 and the Thé venin equivalent of the circuit to the right of node 2. Then solve the resulting simplified circuit.