import java.io.*; import java.util.*; class SeqSearch { private int size; private int[] a; private int index; private int n=0; //--------------------------------------------------------------------------------------- // constructor defined //--------------------------------------------------------------------------------------- public SeqSearch(int Max) { size=Max; a=new int[size]; index=0; } //--------------------------------------------------------------------------------------- // inserting an element in the array //--------------------------------------------------------------------------------------- public void insert(int val) { try { a[index++] = val; n=index; } catch(Exception e) { System.out.println(“e.getMessage”); } } //--------------------------------------------------------------------------------------------- // Searching the element by sequential search // method //--------------------------------------------------------------------------------------------- public int Search(int key) { for(int i=0; i