Question: PART B (Answer ONE Question Only) QUESTION 3 (a) Imagine that you are working as a software developer. You have been assigned to write a

 PART B (Answer ONE Question Only) QUESTION 3 (a) Imagine thatyou are working as a software developer. You have been assigned to

PART B (Answer ONE Question Only) QUESTION 3 (a) Imagine that you are working as a software developer. You have been assigned to write a software package that is able to help Electrical engineer to simulate a basic direct current (DC) circuit containing a single resistor (R) and a single capacitor (C) as illustrated in Figure Q3(a). RC Charging Switch R Icharging Vs (Vc) Vc = V(1 - e Where: e Vc is the voltage across capacitor. Vs is the supplied voltage. is exponential is time in second(s). R is the resistor value in Ohm (12). C is the capacitor value in Farad (F). Figure Q3(a) t The software should fulfill the following criteria: 1. Receive three floating values from user for: a) supply voltage, Vs; b) capacitor value, C; and c) resistor value, R. 2. A function called calculate simulateCharging () which takes all three values from (1). The function will print the value of the floating-point numbers in array for voltage across the capacitor, V, during the charging phenome for a given time, t which starts at 0 second to 10 second with an interval time of 1 second. Formula as provided in Figure Q3(a). An example of the output is illustrated in Figure Q3(b). Note: the bold word is the input given by user. CONSOLE OUTPUT Please insert Vs in V: 10 Please insert R in Ohm: 2 Please insert c in Farad: 0.5 t = Os t = ls t = 2s t = 35 t = 4s t = 5s t = 6s t = 7s t = 8s t = 9s t = 105 Vc = 0.000V Vc = 6.3210 Vc = 8.647v Vc = 9.502V Vc = 9.817V Vc = 9.933V Vc = 9.975V Vc = 9.991V Vc = 9.9977 Vc = 9.999V Vc = 10.000V Figure Q3(b) Based on the following requirement, you have to: (i) Write the complete program of the software package. [17 marks] Sketch a flowchart for the software package. [8 marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!