This repository contains a .NET Core command line program written in C# that will take operations on fractions as an input and produce a fractional result.
Three projects were created to track the basic functionality of this application:
- Rational Number Representation
- Rational Number Arithmetic Operations
- Rational Number Arithmetic Operations Shell
- Rational Number Library contains a RationalNumber class that represents a Rational Number and is able to parse fractions in the following syntax
[whole_]numerator/denominatory. - Rational Number Tests Library contains basic unit tests using NUnit and FluentAssertions.
- Rational Number Shell contains a basic command line shell to solve arithmetic operations between two fractions.
In order to to run these projects, .NET Core 2.2 or newer MUST be installed in your computer along with the dotnet command line tool.
In order to run the Shell Application, execute the follwing from this reposity's root folder:
> dotnet run -p RationalNumberShell/RationalNumberShell.csprojWhile running the application, enter help to get a quick guide of how to enter valid expressions. This will also be displayed after a few consecutive unsuccessful attempts at solving an equation.
In order to run the test cases of the solution in the command line, execute the following from this repository's root folder:
> dotnet test RationalNumber.sln
Alternatively, you may run directly from the Test Folder:
> dotnet test Anzurio.Rational.Tests.csproj