Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program [Prod.java] that reads in two integers from standard input and prints their product to standard output. Use vi to this program as
Write a program [Prod.java] that reads in two integers from standard input and prints their product to standard output. Use vi to this program as "Prodjava". Compile the Prod.java using javac. If there are mistakes, fix them by going back to step (a). Run this program (java Prod) using the defaults (keyboard and screen) for standard in- put and standard output. Run this program but redirect the output to a file named prod.output. Using the vi editor, create three different files: data1.in, data2.in, data3.in. The con- tents of prod1.in should be "4 20", the contents of prod2.in should be "20 4" and the con- tents of prod3.in should be "1 23". 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. 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started