Ohm's Law Calculator is a simple dotnet solution with 3 projects that implements the Ohm's law formula in a small calculator like library created to practice some of the xUnit Test Framework features.
Ohm's law states that the current through a conductor between two points is directly proportional to the voltage across the two points. Introducing the constant of proportionality, the resistance, one arrives at the usual mathematical equation that describes this relationship:
V = I x R
V
: Volgate (Volts)I
: Current (Amps)R
: Resistance (Ohms)
- OhmsLawCalculator: This is a Class Library project created with the dotnet CLI that contains a static class with 3 methods to perform the calculation for voltage, current and resistance.
- OhmsLawCalculator.XUnit.Tests: This is the xUnit project that contains the unit tests.
- OhmsLawCalculator.ConsoleUI: This is just a common console app with some example of usage.