| 118 | } |
| 119 | |
| 120 | class Gssarray |
| 121 | { |
| 122 | public static void main(String[] args) { |
| 123 | Scanner sc = new Scanner(System.in); |
| 124 | GSSArray gs = new GSSArray(5); |
| 125 | |
| 126 | int choice, val; |
| 127 | boolean ans; |
| 128 | |
| 129 | while (true) { |
| 130 | System.out.println("Enter 1 to insert"); |
| 131 | System.out.println("Enter 2 to delete"); |
| 132 | System.out.println("Enter 3 to exit"); |
| 133 | choice = sc.nextInt(); |
| 134 | if (choice == 1) { |
| 135 | System.out.print("Enter the value to enter in array: "); |
| 136 | val = sc.nextInt(); |
| 137 | gs.insert(val); |
| 138 | } else if (choice == 2) { |
| 139 | System.out.print("Enter the value to delete: "); |
| 140 | val = sc.nextInt(); |
| 141 | ans = gs.delete(val); |
| 142 | System.out.println(ans); |
| 143 | gs.display(); |
| 144 | } else if (choice == 3) { |
| 145 | System.out.println("Thank You!"); |
| 146 | break; |
| 147 | } |
| 148 | } |
| 149 | sc.close(); |
| 150 | } |
| 151 | } |
nothing calls this directly
no outgoing calls
no test coverage detected