Question: Please make sure the answer is correct before posting this, thank you, good luck!! PART 3: Implement Methods Q1: (25 points) Mixed Fraction: A mixed
PART 3: Implement Methods Q1: (25 points) Mixed Fraction: A mixed fraction is a whole number and a proper fraction combined. Such as 1 4 Write a Class MixedFraction that would represent this data type Identify the correct data types (1 point) Write a constructor that takes the necessary parameters and sets them (1 point) Write a default constructor (1 point) Write the necessary getters (1 point) Write the setters (I point) Write an override for toString method (1.5 point) Write an override for equals method (1.5 point) Write a print Method (I point) Write a method that will convert the mixed fraction to its equivalent improper fraction. You can assume that a Fraction class is already available. (2 points) Write an instance method that adds two mixed Fractions by passing a Mixed Fraction object (2 points ) Write an instance method that adds two mixed Fractions using individual fields (2 points) Write a static method that will add two mixed fractions (2 points) Write a Driver that will do the following o Create a Mixed Fraction using default constructor (call it mfl) (1 Point) o Create a Mixed Fraction 1 % using overloaded constructor (call it mf2) (1 Point) o Call Print method to print mf2 (1 point) Using Setters set value of 2 to mfl (2 points) Call instance method to add mfl and mf2 by using the overload that takes MixedFraction object (1 Point) Call instance method to add mfl and mf2 by using the overload that takes the individual fields (1 Point) o o o Call Static method to add mfl and mf2 (1 Point)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
