Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Description

This app was made to perform simple mathematical operations on fractions. A large part of this was to create a Fraction class as part of a library, which can be used to solve fraction computations in both console and graphical applications at th same time.

To that end this App has some large seperate parts:

  • A class library containing the Fraction class.
  • Unit tests for this Fraction class.
  • A console application to demonstrate the basic usage of the class.
  • A graphical WPF application to allow the user to solve fractional computations.

Author

This App was made by Olivier Westerman while studying at Vives Brugge in Spring 2024.

Screenshots

Console Demo App

ConsoleDemoSelection ConsoleDemoOriginalFractions

ConsoleDemoOriginalFractionsSolutions ConsoleDemoRandomFractionsSolutions

Unit Tests

UnitTests

WPF Application

StartupWPF StartTabWPF OperatorsTabEmptyWPF OperatorsTabActionWPF ManipulatorsTabEmptyWPF ManipulatorsTabActionWPF

Setup

To set up and use the App effectively, you'll need to make sure you have Microsoft Visual Studio installed and enable or install the xUnit testing module. It is also important to make sure you are working in a .NET 6 or higher environment. You can find a step-by-step guide for installing these packages here:

  • Visual Studio Community edition by following this link.
  • xUnit by following this link.
  • .Net by following this link.

Once everything is installed, open the project solution named 'FractionsApp.sln'. Then, build the solution to ensure all dependencies are resolved. At the top of your window, select which project you want to run with the dropdown and the click on the play button next to it to run. RunningProgram

Unit Tests

The UnitTestFractions class contains tests for the Fraction class, ensuring methods perform as expected and give correct results in various scenarios.
It checks for properties like Numerator and Denominator, ensuring the safeguard for the Denominator works properly.
Arithmetic tests cover addition, subtraction, multiplication, and division with various values.
Reciprocal and Invert methods are validated, alongside Simplify method for large fractions.
Result method is tested for correct floating-point approximation, and ToString method for correct string representation.
To run these tests see Chapter Setup above.

UML diagram

The following is the UML diagram for the Library as well as the other projects that it connects to.
The UML of the Fraction class would only be the blue class. UML diagram

This link also leads to a diagram version that can be zoomed in on but you do need to sign in with a Lucid account for that.

Future Improvements

  • The layout of the WPF does not exactly conform to what was requested because I wanted to add my own touch to the project.
  • It also could use some more work in terms of user experience since the amount of information on the screen could be overwhelming.
  • I'm also sure there is a more powerful way to code the WPF-application without as much repetition in term of functions, I might have overused the copy-paste buttons.
  • I would have loved to be able to use radial progress bars to create circles like piecharts to resemble each fraction but this was not a standardard tool. Alot of time was 'wasted' on my end to try and make that work but in the end I also like my regular progress bars.
  • In term of functionality there is alot more that could be added. Logaritmic function, exponentials, square roots and the like.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors