Question: Given this following code, I need help on creating a menu to add onto this code. The pictures below explain what are the requirements for

Given this following code, I need help on creating a menu to add onto this code. The pictures below explain what are the requirements for this menu.

#include #include

using namespace std;

struct node { string name; double resistance; double voltage_across; double power_across; };

double findSeriesCurrent(node n,vector r){ double totalr = 0; for (int i = 0; i

double calPower(node n, double i){ return n.voltage_across * i; }

void calVoltageDropAcrossResistors(node n, double k, vector r){ for (int i = 0; i

void calVoltageDropAcrossResistors(double k, vector r){ for (int i = 0; i

void calPowerDissipationAcrossResistors(double k, vector r){ for (int i = 0; i

void Display(node n, vector r,double sc){ cout

node n; vector r; double res;

cout > n.voltage_across; cout > res; if (res == -1) break; r.push_back(res); } double current = findSeriesCurrent(n,r); Display(n, r, current); return 0; }

Given this following code, I need help on creating a menu toadd onto this code. The pictures below explain what are the requirements

Part C: Series DC Circuit Editor Add a menu to your creation in part B. The menu should contain at least the following options: Change Input voltage Add a single resistor . Delete resistor Edit resistor Group add a series of resistors Display network Quit program Each item in the menu wll probably end up being a function. Some of these functions can be copied from part B. A do-while loop and switch/case statement is probably best way to implement a menu You need to create at least 4 functions to get credit for part C. Task 1: Download starter code From within cloud 9 do the following: Open up a terminal Change directory to your GIT repository and do the following: git pull It should download the lab6 starter files which include the sample code, and three empty source files for development purposes. Task2: Optionally implement a basic simple 1-node DC CKT Simulator First start by reading the specification and the Ohm's law primer enclosed within this document. Next implement a simple series circuit.simulator/solver using C++ functions as specified in the

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!