Question: C# LANGUAGE ASSIGNMENT INFS 2600 Programming Assignment 2 (PA2) You are to create an application that helps the user design an electrical circuit that will

 C# LANGUAGE ASSIGNMENT INFS 2600 Programming Assignment 2 (PA2) You are

to create an application that helps the user design an electrical circuit

C# LANGUAGE ASSIGNMENT

INFS 2600 Programming Assignment 2 (PA2) You are to create an application that helps the user design an electrical circuit that will power LEDs. Create a new Console Application project and name it YourLastNamePA2 Problem Descriptiorn The fundamental equation when designing an electrical circuit is called Ohm's Law. Ohm's Law states that Voltage Current * Resistance (V "R), where voltage is measured in volts, current is measured in amps, and resistance is measured in ohms. An LED, or Light-Emitting Diode, is an electrical component that emits light of a certain color. LED's are used in most modern electrical devices, including TVs, cell phones, toys, computers, etc. LED's require at least 20 milliamps (or 0.02 amps) in order to produce light, and require 2.2 volts across the device A simple circuit that will power an n number of LEDs has the relationship: 0.02 R+n 2.2 Where V is the required voltage to power n LEDs in series with a resistor of R ohms. We will create an application that allows the user to enter two of the above three values, and solve for the remaining value. We will use methods to make this work easier to manage. .Create a method that takes as input parameters a resistance value (in ohms) and a number of LEDs (n), and returns the value of the required voltage to power the n LEDs. 0.02 R n 2.2 Create a method that takes as input parameters a resistance value (in ohms) and a supply voltage value (V), and returns the total number of LED's that can be supplied (as a whole number- we cannot power 1.5 LEDs!). . n = (V. 0.02 R) / 2.2 . Create a method that takes as input parameters a supply voltage value (V) and the number of LEDs to power (n), and returns the value of the required resistance to place in series with the LEDs. R(VR-n 2.2)0.02 Create an application in your Main() method that prompts the user to solve for (V)oltage, (Njumber of LEDs, or (R)esitance. Depending on the user input, prompt for the remaining values and output the result, then reprompt the user the menu choices again. (e. If the user chooses to solve for Voltage, prompt the user for a resistance value and number of LEDs value.) If/when the user enters an invalid choice, the application will end. Note: Prompting should happen in Main the above three methods should use input parameters values to do calculations. Numeric prompts should be protected against non-numeric inputs

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!