Question: The program below reads a file name from the keyboard which contains blood pressure records (see sample file format below), opens the file, reads the

The program below reads a file name from the keyboard which contains blood pressure records (see sample file format below), opens the file, reads the record values from the file, displays the record, counts the number of records in the file and displays the final count. Inspect the following program code and complete the program code for the required programming task. You do NOT have to rewrite the whole program. Write only the missing code. Sample file format: 120 80 125 90 import Java.util.scanner import java.io.* public class BloodPressure public static void main (String args) throws IOException int count-0; Scanner readInput - new Scanner (System.in) //Get the file name System.out.print ("Enter the file name: ") String fileName- readInput.nextLine //open the file Write Missing Code***/ Scanner myFile -new Scanner (filePtr) while myFile.hasNext )) //Read the record values /*Write Missing Code***/ //Display the record and update counter /**Write Missing Code **/ //Display the total number of records in the file Write Missing Code***/ //Close the file Write Missing Code***/
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
