Page 628 - Computer science 868 Class 12
P. 628
90 case 1:
91 System.out.println("Number");
92 x=sc.nextInt();
93 ob.addrear(x);
94 break;
95 case 2:
96 System.out.println("Number");
97 x=sc.nextInt();
98 ob.addfront(x);
99 break;
100 case 3:
101 ob.delrear();
102 break;
103 case 4:
104 ob.delfront();
105 break;
106 case 5:
107 ob.display();
108 break;
109 }
110 }
111 while(ch>=1&&ch<=5);
112 }
113 }
Output of the preceding program is as follows:
DQueue Size: 3
Main Menu
Press 1 to Add at Rear
Press 2 to Delete at Front
Press 3 to Add at Front
Press 4 to Delete at Rear
Press 5 to Display DQueue
1
Number to Insert: 5
626626 Touchpad Computer Science-XII

