Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Automatic Zoom Fraction + property> Numerator : int + property> Denominator : int + constructor Fraction() + constructor Fraction(thisFraction : Fraction) + constructor Fraction(numerator :

Automatic Zoom Fraction + property> Numerator : int + property> Denominator : int + constructor Fraction() + constructor Fraction(thisFraction : Fraction) + constructor Fraction(numerator : int, denominator : int) - Reduce(): void - LowestCommon Denominator(x: Fraction, y: Fraction): int + operator+(x: Fraction, y: Fraction) + operator-(x: Fraction, y: Fraction) + operator*(x: Fraction, y: Fraction) + operator/(x : Fraction, y: Fraction) + ToDecimal(decimalPlaces : int = 3) : double + ToString(): string Property Visibility Data type Description Numerator public int Gets and sets the value stored in the numerator member variable. Denominator public int Gets and sets the value stored in the _denominator member variable. If the value assigned to this property is equal to zero, throw a DivideByZeroException. Method Visibility Return Description Fraction() public N/A Default constructor. Assign both properties to 1. Fraction(thisFraction) public N/A Copy constructor. Copies the Numerator and Denominator property values of the passed-in Fraction object to this Fraction. Fraction (numerator, denominator) public N/A Constructor. Assign passed-in values to their associated properties. Reduce() private void Method sets Numerator and Denominator property values to their lowest terms. Method calculates and returns the lowest common denominator based on Denominator LowestCommonDenominator(x, y) private int property values of two Fraction objects. Enable \"adding\" two Fraction objects together.

To add two fractions together: find a operator+(x, y) public Fraction common multiple for both fraction's denominators; add both fraction's numerators together; reduce the resulting fraction. Enable \"subtracting\" a Fraction object from another Fraction object. To subtract a operator-(x, y) public Fraction fraction from another fraction: find a common multiple for both fraction's denominators; subtract the second fraction's numerator from the first fraction's numerator; reduce the Enable \"multiplying\" two Fraction objects together. To multiple two fractions together: operator* (x, y) public Fraction multiply both fraction's numerators together; multiply both fraction's denominators together; reduce the resulting fraction. Enable \"dividing\" a Fraction object by another Fraction object. To divide a fraction by another fraction: multiple the first fraction's numerator by the second fraction's operator/(x, y) public Fraction denominator; multiple the first fraction's denominator by the second fraction's numerator; reduce the resulting fraction. When dividing fractions, the second fraction's numerator cannot be zero. ToDecimal(precision) public double Return the decimal equivalent of the fraction. ToString() public string Return string representation of object in the form of: \"/\" resulting g fraction 2 of 2 + Automatic Zoom Fractions Calculator WinForms Driver Class Write a C# Windows Forms application to perform addition, subtraction, multiplication, and division calculations on two fractions using objects of the Fraction class. Fractions Calculator X Fractions Calculator 2 5 2 5 ** + = 29/21 = = 10/21 3 7 3 7 Calculate Clear Calculate Clear Decimal equivalent: 1.381 Decimal equivalent: 0.476 Fractions Calculator Fractions Calculator X X 2 5 2 = 7 = 3 3 7 Calculate Clear Calculate Clear Denominators must be a positive whole number. Invalid numerator. Calculation requires division by zero. Additional Requirements Set the form's \"accept\" button to the Calculate button. The \"Clear\" button blanks the textboxes and labels, resets the dropdown to addition, and sets the focus to the first textbox. Place appropriate keyboard accelerators on relevant controls. On execution, the application is centered on the desktop. Do not allow the user to resize the form. Disable the Maximize button. Ensure the application has a logical tab order.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions

Question

What is the confidence level associated with a confidence interval?

Answered: 1 week ago

Question

2. What are the main goals in delivering bad news?

Answered: 1 week ago