Write the following program in Java: The first prompt is for the user to select an one of the actions listed below... PushA(x): Push element x on stack A. \user inputs a number to be pushed PushB(x): Push element x on stack B. \user inputs a number to be pushed MultiPopA(k): Pop min{k,n} elements from A. \ user inputs n as the number of elements to pop and display MultiPopB(k): Pop min{k,m} elements from B. \ user inputs m as the number of elements to pop and display Transfer(k): Repeatedly pop an element from A and push it on B, until either k elements have been moved or A is empty. \unser inputs k as the number of elements to transfer
Get Free Quote!
260 Experts Online