Skip to content

anzurio/RationalNumber

Repository files navigation

Rational Number

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.

Definition

Three projects were created to track the basic functionality of this application:

Components

  • 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.

Getting Started

Prerequistes

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.

Running the Application

In order to run the Shell Application, execute the follwing from this reposity's root folder:

> dotnet run -p RationalNumberShell/RationalNumberShell.csproj

While 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.

Running Tests

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

About

.NET Core Command Line Application for Basic Rational Arithmetic

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages