CMSC 350 Project 1 .ZIP

CMSC 350 Project 1

CMSC 350 Project 1 Implement a generic stack and queue classes (StackUMUC and QueueUMUC, named to avoid confusion with the classes already defined in the JDK). Specific requirements include: • Create a set of tests demonstrating that your classes work correctly. • Use the GUI and classes you defined in Week to test your stack and queue classes. • Methods for StackUMUC • StackUMUC (int) // constructor • void push (T) • T pop () • T peek () • String toString () • Methods for QueueUMUC • QueueUMUC (int) // constructor • void put (T) • T get () • T peek () • String toString () In your documentation, answer this question: At what point does the performance of your program begin to degrade - say take longer than 1 or 10 seconds? • Submission should include the following in a single zip file: • a readme file (see below) • all source code files • relevant data files • Documentation (a readme file) for the project should include the following sections: • a description of the design, • a user's guide • a test plan • a section on lessons learned • this should be a single file in one of the following formats: doc, docx, txt, odt, pdf • this should be a professional quality presentation • there should be appropriate comments in the source code files Submit your zip file to the project 1 submission area. public class Stack implements Iterable { private int N; // size of the stack private Node first; // top of stack // helper linked list class private class Node { private Item item; private Node next; } /** * Create an empty stack. */ public Stack() { first = null; N = 0; } /** * Is the stack emxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Powered by