Page 557 - ComputerScience_Class_11
P. 557
150 System.out.println("Pan Number : "+pan);
151 System.out.println("TaxIncome : "+taxIncome);
152 }
153 catch(EOFException e)
154 {
155 System.out.println("This is end of File");
156 eof = true;
157
}
158 }
159 mat1.close();
160 break;
161 case 6:
162 System.out.println("Thank You");
163 break;
164 default: System.out.println("Invalid choice");
165 }
166 }
167 while(ch!=6);
168 }
169 }
Output
Main Menu
Press 1 for creating a file
Press 2 for appending a file
Press 3 for deleting data from a file
Press 4 for modifying a file
Press 5 for reading a file
Press 6 to exit
Please enter your choice : 1
Input the Name of the Employee : RAM
Input the Pan Number : ABC123
Input the TaxableIncome : 245678
Do you wish to input more data?(y/n)
y
Input the Name of the Employee : SHYAM
Input the Pan Number : WEDS345
Input the TaxableIncome : 12345
Do you wish to input more data?(y/n)
n
Main Menu
Press 1 for creating a file
Press 2 for appending a file
Press 3 for deleting data from a file
Press 4 for modifying a file
Press 5 for reading a file
Press 6 to exit
Sample Projects 555

