Question: EE 6 4 1 1 C + + Group Programming Project 1 . Overview This programming project is to be undertaken in groups of three

EE6411 C++ Group Programming Project 1. 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, i.e. 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. 2. 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 required/desirable): - Creation of resistors with a given resistance and a name/label (string). A newly created resistor will have a voltage of 0V applied (and consequently will also have a current of 0A).- 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 name/label 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 component(s) and label/name - 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 1 of 5- Set overall voltage (also calculates the overall current and sets the component voltages). EE6411 C++ Programming Autumn 2024- 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 label/name 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 function/method 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 1 or Circuit 2(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 1 or component 2 of the (as outlined below) circuit (prompt user again for choice 1 or 2). Get voltage across the overall circuit Get voltage across component 1 or component 2 of the current circuit (prompt user again for choice 1 or 2). Get current through the overall circuit Get current through component 1 or component 2 of the current circuit (prompt user again for choice 1 or 2) Exit the application If your user interface is not in main(), write a main() function to run your application. Make sure to comment all classes/files for doxygen.

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 Programming Questions!