Create a class called Fraction that can be used to represent the ratio of two integers. Include
Question:
Create a class called Fraction that can be used to represent the ratio of two integers. Include appropriate constructors, properties, and methods. One of the methods should reduce the fraction to its lowest terms. If the denominator becomes zero, throw and handle an exception. Create an application class to test the Fraction class. Be sure to test your exception-handling code.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
C# Programming From Problem Analysis To Program Design
ISBN: 9781285096261
4th Edition
Authors: Barbara Doyle
Question Posted: