Question: I only need the process from d to g, a thumb up will be given, thank you. Write a program [Prod.java] that reads in two
I only need the process from "d" to "g", a thumb up will be given, thank you.
Write a program [Prod.java] that reads in two integers from standard input and prints their product to standard output. a) Use vi to this program as "Prod.java". b) Compile the Prod.java using javac. If there are mistakes, fix them by going back to step (a). c) Run this program (java Prod) using the defaults (keyboard and screen) for standard input and standard output. d) Run this program but redirect the output to a file named prod.output. e) Using the vi editor, create three different files: data1.in, data2.in, data3.in. The contents of prod1.in should be "4 20", the contents of prod2.in should be "20 4 " and the contents of prod3.in should be "1 23". f) Run your program (prod) three times, but redirect the input of the program so that the first time it gets input from data1.in, the second time from data2.in, etc. g) Suppose I gave you a program and said it did what this one did. How many sets of three numbers would you use to test it to be sure? What numbers would you use
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
