Logic & Coding Fraction Lab

import java.util.Scanner; public class fractionslab { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); } } class Fraction { // instance variables private int num; private int denom; // constructors public Fraction (int n, int d) { // code goes here } public Fraction (double decimal) { // code goes here } // Fraction class definition, continued. Page 2 in printout. // mutator methods: NOTE that you need to choose arguments and return types // as well as writing the code for each. void simplify() { // code goes here to express the fraction in simplest form } void setNumerator() { // code goes here } void setDenominator() { // code goes here } void setValue() { // code goes here to change both numerator and denominator } // Fraction class definition, page 3: // accessor methods: You need to set arguments and return types as well as code int getNumerator() { // code goes here } int getDenominator() { // code goes here } double getDecimal() { // code goes here } // comparator methods: Arguments are given, but you need to set return types and code. boolean isGreater(Fraction b) { // code goes here } boolean isEqual (Fraction b) { // code goes here } boolean isGreaterOrEqual (Fraction b) { // code goes here } // Note that the following three methods are already written. public boolean isLess(Fraction b) { return !(this.isGreaterOrEqual(b)); } public boolean isNotEqual(Fraction b) { return !(this.isEqual(b)); } public boolean isLessOrEqual(Fraction b) { return !(this.isGreater(b)); } // Fraction class definition, page 4 // Basic mathematical methods: Unless they are given, you need to set arguments. Fraction add(Fraction b) { // code goes here } Fraction subtract(Fraction b) { // code goes here } Fraction multiply(Fraction b) { // code goes here } Fraction divide(Fraction b) { // code goes here } Fraction power(int p) { // code goes here } // Other methods: Choose return types. int findLCD(Fraction b) { // code goes here } int findLCD(int otherDenom) { // code goes here } Fraction findReciprocal() { // code goes here: Note that this is arity 0. } // Fraction class definition, page 5 // other methods, continued double toDecimal() { // code goes here } public String toString() { // code goes here } void printFraction() { // code goes here: note arity 0 } void printMixedNumber () { // code goes here: note arity 0 } }