Write a stack client | Computer Science homework help

  

Write a stack client Brackets.java  that reads in sequence of left and right parentheses, braces, and brackets from standard input and uses a stack to determine whether the sequence is properly balanced. 

Don't use plagiarized sources. Get Your Custom Essay on
Need an answer from similar question? You have just landed to the most confidential, trustful essay writing service to order the paper from.
Just from $11/Page
Order Now

For example, your program should print true for [()]{}{[()()]()} (Brackets1.txt)

and false for [(]) (Brackets2.txt). These input files are in Code,Documents.

Your calling statement should be: java Brackets < Brackets1.txt or 

java Brackets < Brackets2.txt. Run both input files.  

use the program WeightedQuickUnionUF.java and again use the file “Assn2and3” as input. Modify the program to count the actual number of array accesses with a variable – disregard the array initialization. Submit a .txt file of the program with the results at the end.