Page 513 - computer science (868) class 11
P. 513
29 name = br.readLine();
30 System.out.print("Input Pan Number : ");
31 pan = br.readLine();
32 System.out.print("Input TaxableIncome : ");
33 taxIncome = Double.parseDouble(br.readLine());
34 mat.writeUTF(name);
35 mat.writeUTF(pan);
36 mat.writeDouble(taxIncome);
37 System.out.println("Do you wish to input more data?(y/n)");
38 choice = br.readLine();
39 }
40 while(choice.equalsIgnoreCase("y")==true);
41 mat.close();
42 break;
43 case 2:
44 DataOutputStream mat2 = new DataOutputStream(new
FileOutputStream("info.dat",true));
45 do
46 {
47 System.out.print("Input the Name of the Employee : ");
48 name = br.readLine();
49 System.out.print("Input the Pan Number : ");
50 pan = br.readLine();
51 System.out.print("Input the TaxableIncome : ");
52 taxIncome = Double.parseDouble(br.readLine());
53 mat2.writeUTF(name);
54 mat2.writeUTF(pan);
55 mat2.writeDouble(taxIncome);
56 System.out.print("Do you wish to input more data?(y/n)
: ");
57 choice = br.readLine();
58 }
59 while(choice.equalsIgnoreCase("y")==true);
60 mat2.close();
61 break;
62 case 3:
511
Sample Projects 511

