Question: can some correct the code. public class FractionDemo public static void main(String[] args) { //var for two fractions int num1, num2, den1, den2; //create Scanner

![main(String[] args) \{ //var for two fractions int num1, num2, den1, den2;](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f45f49a6ab6_20966f45f4904fe1.jpg)


can some correct the code.
public class FractionDemo public static void main(String[] args) \{ //var for two fractions int num1, num2, den1, den2; //create Scanner object to read keyboard input Scanner keyboard = new Scanner (System. in); I/get integers for f1 numerator and denominator System.out.print("Enter the numerator and denominator of fraction 1, separated by a space: "); num1 = keyboard nextInt(); den 1= keyboard . nextInt(); 1/ get integers for +2 numerator and denominator System.out.print("Enter the numerator and denominator of fraction 2, separated by a space: "); num2 = keyboard. neptint () ; den2 = keyboard nextInt(); //instantiate the two fractions Fraction f1= new Fraction (num1, den 1 ); Fraction +2= new Fraction (num2, den2); //display the two fractions System.out.println("Fraction 1: " +f1 ); System.out.println("Fraction 2:"+f2 ); 1/ multiply the two fractions and store product in f3 Fraction f3=f. multiply (f2); Driver class (FractionDemo.java) code: screen shot 1 - The beginning of the code for the driver class Driver class (FractionDemo.java): screen shot 2 - Pseudocode for the remainder of the code for the driver class - You are encouraged to refer to the Concepts-Lab13-cs110.pdf file, which has some of the code needed to implement this pseudocode Lab13 Program output when user attempts to assign zero to denominator
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
