Create a separate class for your stack

Assignment Help JAVA Programming
Reference no: EM131145363

Write a java program for the following, must be two seperate methods(main and the stack class using generics).

The purpose of the stack is to check an expression involving parentheses, braces, & brackets and determine whether they are balanced

Create a separate class for your stack and implement three stack related methods (push(), pop(), and peek() only) in it.

YOU ARE NOT ALLOWED TO USE STACK CLASS FROM JAVA API.

You need to build your own stack class. The class should be reusable, that is, do not make it type specific. Use of Generic could be helpful. You can use this stack class in future to solve stack-related problems involving any data type.

Safely assign relatively large size (may be 1000) for the stack. Once the stack class is built use the class to solve the problem mentioned above. This should be a separate .java file containing the main() method.

The main() method is responsible to capture the input (file name with .java extension), parse it, use the stack (as defined in the other file), and then produce the output displaying a message showing whether the expression is balanced (parentheses, braces, and brackets) or not.

Reference no: EM131145363

Questions Cloud

How many months of living expenses does the article : Estimate how much you should set aside based upon your current situation. Are you closer to Cliff's scenario or to Prudence's?
Write a pseudo-code program : Create 10 child processes and each child process will in turn create a grandchild process.
Explain customer defined value-value analysis and retention : Explain customer defined value, value analysis and retention. Discuss product innovation models for customer retention. Discuss employee empowerment. Discuss leadership for quality. How to lead for a better quality change?
What is your projected sales volume by month : Sales Revenue Forecast: What is your projected sales volume by month for the first year? Expense Forecast: What is your total expected marketing costs? Break your costs down by each marketing, promotion, and action program strategy that you listed ..
Create a separate class for your stack : The purpose of the stack is to check an expression involving parentheses, braces, & brackets and determine whether they are balanced
How an individual or firm acting out of self interest : Create an original example to demonstrate how an individual or firm acting out of self-interest (seeking profits by offering goods or services in economic markets) must benefit consumers – even if they do not care about them - more than the competiti..
Was there anything unethical about the presidents actions : Riverside Automotive Corp. is a medium-sized wholesaler of automotive parts. It has 10 stockholders who have been paid a total of $1 million in cash dividends for 8 consecutive years.
Describe how socioeconomic status affects health care : Socioeconomic status influences health and drives diversity in the context of health disparities. Based on readings provided, describe how socioeconomic status affects health care. Can diversity in the health care workforce promote better health c..
Importance of quality partnering and strategic alliances : Discuss the importance of quality partnering and strategic alliances. Discuss the various forms of quality partnering and strategic alliances. Discuss the importance of quality culture

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd