Question: EE 6 4 1 1 C + + Group Programming Project 1 . Overview This programming project is to be undertaken in groups of three
EE C Group Programming Project Overview This programming project is to be undertaken in groups of three to five students. Any queries regarding the group project should be raised via the modules Brightspace Page Discussion facility. You can also post there messages to find a group to join or to look for new group members. Your task is to write a program for circuit analysis, ie a program that can model circuits of resistors under DC power. The operations that your program should be able to perform are the following: a Resistance of the overall circuit and of the individual components of the circuit b Given a voltage applied to the overall circuit, the resulting voltage at the individual components. c Given a voltage applied to the overall circuit, the resulting current flowing through the overall circuit and through individual components of the circuit. Instructions Carefully follow these steps in the order given it will simplify your task: Develop a C class Resistor, which must support at least the following operations feel free to add any other operations you deem requireddesirable: Creation of resistors with a given resistance and a namelabel string A newly created resistor will have a voltage of V applied and consequently will also have a current of A Setting the voltage applied to the resistor this method should also automatically calculate the resulting current through the resistor Getting the voltage currently applied to the resistor. Getting the current currently flowing through the resistor. Getting the namelabel of the resistor Develop classes yes plural! for Circuits see details in next bullet point: use an abstract base class Circuit that defines the common interface this can simplify your application This class then has three concrete derived classes: i One for circuits with a single component this single component must be a resistor ii iii. One for circuits connected in series must have two components, where each component is implemented as an attribute of the abstract base class type Circuit One for circuits connected in parallel must have two components, where each component is implemented as an attribute of the abstract base class type Circuit In this assignment, a circuit has at most two components. Each component is again a circuit. Your class must support at least the following operations: Create circuit with given components and labelname Get a string representation of the circuit. Use for parallel and for series connection. Get overall resistance. Get resistance of component one. Get resistance of component two. Page of Set overall voltage also calculates the overall current and sets the component voltages EE C Programming Autumn Get overall voltage. Get voltage across component one. Get voltage across component two. Get overall current. Get current through component one. Get current through component two. Get the labelname of the circuit Add the following methods to your circuit analyser program either as global functions or as methods of a class CircuitAnalyser: a A functionmethod to create and return an object of your Circuit class that models the circuits displayed at the end of this description one method per circuit b A user interface method use a simple console interface there is no need to create any GUI that prompts the user to enter a number to select from the menu options: i Choose Circuit or Circuit as outlined below in Appendix as current circuit. ii iii. iv v vi vii. viii. ix x Get a string representing current circuit Apply an overall voltage to the current circuit Get resistance of the current circuit Get resistance of component or component of the as outlined below circuit prompt user again for choice or Get voltage across the overall circuit Get voltage across component or component of the current circuit prompt user again for choice or Get current through the overall circuit Get current through component or component of the current circuit prompt user again for choice or Exit the application If your user interface is not in main write a main function to run your application. Make sure to comment all classesfiles for doxygen.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
