Create the following Functions Then create a Test script tha

Create the following Functions. Then create a Test script that calls all of the function below and tests them. The test function should display the output from you\'re the function below. Multiply(a, b) Divide(a, b) Add(a, b) Subtract(a, b) Create a function that askes the user for a filename and continuously askes them what they would like to put into their file. If they enter 10 lines or enter \"Nothing else\" stop filling the file and close it. FillAFile(filename) Create a function that takes in a filename, reads and displays the first line and the last line. Then close the file. ReadLine(filename)

Solution

subtraction();

} else if (choice == 3){

division(); } else if (choice == 4){

multiplication(); }

System.out.println();

kb.close();

}

public static void addition(){

System.out.println(\"\ Sum: \" + nOne + \" + \" + nTwo + \" = \" + (nOne + nTwo));

}

public static void subtraction(){

System.out.println(\"\ Sum: \" + nOne + \" - \" + nTwo + \" = \" + (nOne - nTwo));

}

public static void division(){

System.out.println(\"\ Sum: \" + nOne + \" / \" + nTwo + \" = \" + (nOne / nTwo));

}

public static void multiplication(){

System.out.println(\"\ Sum: \" + nOne + \" x \" + nTwo + \" = \" + (nOne * nTwo));

}

}

 Create the following Functions. Then create a Test script that calls all of the function below and tests them. The test function should display the output from

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site