This preview shows page 1. Sign up to view the full content.
Unformatted text preview: persons into another stack called “ normal ”. Your method should return two stacks public Stack [ ] twoStacks( ) Exercise-2: we have a queue of employees (partTime and fullTime employees) and we need to rearrange the queue such that the first part of the queue contains only the partTime employees and the second part contains only the fulltime employees. Note that the subclasses partTime and fulltime inherit form the superclass Employee. Write a method that rearranges the current queue. public void rearrangeQueue( ) Person -name : String -height: double -weight : double -status : String +Person(na: String, double h, double w) + sets… all + gets. . all...
View Full Document
- Spring '11
- Java Programming