Question: Implement LinkedStack class by implementing the peek(), isEmpty(), size(), and toString() method. Design and create a class called Painting. -artist: String -genre: String -era: String
Implement LinkedStack class by implementing the peek(), isEmpty(), size(), and toString() method.
Design and create a class called Painting.
-artist: String
-genre: String
-era: String
//constructors
//accessors
//mutators
//toString
Test all methods in LinkedStack and Painting class. Must test the Painting methods through the objects on the Stack, not as an object itself.
Use logically correct packaging structure to group classes.
Implement toString method of StackInterface correctly. Meaning, it should print out the top element first and bottom element last. Must also test the toString method more than once to show it does not obliterate stack.
Objectives:
Successful implementation of Painting Class
Creates a stack object that holds the class objects in Painting Class
Tests all six methods of the stack implementation: pop,push,isEmpty, toString, size, peek utilizing the two stack of your own classes.
Tests all the methods in the Painting class through LinkedStack Object
Implements the six methods in the Stack class. (pop, push, isEmpty, size, peek, toString(call toString to each node/each element in each node (Node.getNext())
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
