Provided in the zip file for this prac are two java program files, dataStream1.java and dataStream2.java. Import the
java code into a project in Eclipse. Do the following:
a. Read the code in dataStream1.java to get an understanding of what the code will do. Run the dataStream1
program using the following data as input
10¿
15¿
22.1¿
help¿
Did the program work as you had expected for these input values?
b. Run the program again using the following data as input
10 15 22.1 help¿
Did the program work as you had expected for these input values?
c. Read the code in dataStream2.java to get an understanding of what the code will do. Run the dataStream2
program using the following data as input
10¿
help¿
15¿
22.1¿
Did the program work as you had expected for these values?
Hint: if you can’t work out why some of the data isn’t being read from the keyboard correctly you should read section
2.13 of Gaddis.
Correct the problem(s) that you found in dataStream1.java and dataStream2.java.