Question: use the starting code bellow In arithmetic, a number expressed as a quotient, in which a numerator is divided by a denominator. In a simple

 use the starting code bellow



In arithmetic, a number expressed as a quotient, in which a numerator is divided by a denominator. In a simple fraction, both are integers.A complex fraction has a fraction in the numerator or denominator. Ina proper fraction, the numerator is less than the denominator. If thenumerator is greater, it is called an improper fraction and can alsobe written as a mixed number - a whole-number quotient with aproper-fraction remainder. Any fraction can be written in decimal form by carrying

In arithmetic, a number expressed as a quotient, in which a numerator is divided by a denominator. In a simple fraction, both are integers. A complex fraction has a fraction in the numerator or denominator. In a proper fraction, the numerator is less than the denominator. If the numerator is greater, it is called an improper fraction and can also be written as a mixed number - a whole-number quotient with a proper-fraction remainder. Any fraction can be written in decimal form by carrying out the division of the numerator by the denominator. The result may end at some point, or one or more digits may repeat without end. Objectives: This assignment will assess your mastery of the following objectives: Work with interactive program using scanner and while loop. Design object-oriented structure to manage state and behavior of an entity. Apply the encapsulation to achieve data hiding from the clients. Handle the checked and I/O exception using try catch statement. 01 =02/ Follow prescribed conventions for spacing, indentation, naming methods, and header comments. Rules and Explanations: Your main task is to create two separate Java files Fraction.java and FractionMain.java: Fraction.java: design an entity for fraction. Fraction Main.java: set up a testing environment. = 4 The Fraction class should have exact two private fields numerator and denominator (int type). There is only one constructor that accepts two parameters numerator and denominator. In the constructor, we need to: Validate the parameters to make sure that denominator cannot be zero. The fraction pair of numerator and denominator must be simplified. For example, 2/4 should be reduced to 1/2. If the fraction is negative, the negative sign must be in numerator. For example, -1/2 instead of 1/-2.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

I will provide an answer to the requirements outlined in the original prompt for the Fraction progra... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!