HibernateDaoClient.java - package assignment4 import...

This preview shows page 1 - 2 out of 2 pages.

package assignment4; import java.util.Stack; public class HibernateDaoClient { //instance variables private char type; private Stack pile; //constructor public CardStack(char type) { this.type=type; Stack pile=new Stack(); } //push method public void push(Card newCard) { this.pile.push(newCard); } //pop method public Card pop() { return (Card)this.pile.pop(); } //check if empty public boolean isEmpty() { return this.pile.empty(); } //return size of stack public int size() { return this.pile.size(); } //to view the top card public Card peek() { return (Card)this.pile.peek(); } //print stack method public void printStack(char type) { //Type 's': Print the top card of the stack facing down - [XX]
Image of page 1

Subscribe to view the full document.

Image of page 2
You've reached the end of this preview.
  • Summer '15
  • sidhu kumar tiwari
  • Subroutine, Return statement, Void type, The Stack, public class HibernateDaoClient

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern