.Open CS320 Laboratory Number 14 ADTS . Check out New things on the Course Web Page .See http://www.csci.csusb.edu/dick/cs320/ . Goal To get a better grip on ways of expressing abstract data types --(ADT) in different languages by filling in blanks in a table. Also: how to do tables in HTML. . Given .List A specification of a simple ADT as a C++ header file: .See ./count.h The specification and/or interface for the Abstract Data Type called stack: .See ../stacks/stack.html The directory .See http://www/dick/cs320/stacks is full of source code files in different languages (Ada, C, C++, Java, LISP, Prolog, SmallTalk) defining various kinds of stacks. This page with an table of links and blanks. .Close.List .Open Process Complete the .See ./count.cpp file that defines and tests the functions in .See ./count.h (this took me about 2 minutes). You need to study the files in the table below and figure out .List What language is being used? Does the code define a stack object or a class/adt of stacks? Is it an instance or a way to create instances? Is the code generic or specific to one type of item? If specific what type of item? Does the code implement the stack as specified in .See http://www/dick/cs320/stacks/stack.html and if not how it breaks the spec/interface? .Close.List .Close . Deliverables A new page based on this page. The new page should have links to the specification of a counter .See ./count.h and to your C++ implementation+test .See ./count.cpp plus a comment on what you learned. It should also have a table of links to files (just like the one below) with as many blanks filled in as possible. You can add your own opinions on any of these stacks after the table. You should remove irrelevant things from this page. Your CS320 page should be linked to this new page. . Results .Table Files Language Type or Object Generic? Correct? .Row See .See http://www/dick/cs320/stacks/stack.ads .See http://www/dick/cs320/stacks/stack.adb .Item _ .Item _ .Item _ .Item _ .Row See .See http://www/dick/cs320/stacks/stack.cpp .Item _ .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack.h .See http://www.csci.csusb.edu/dick/cs320/stacks/stack.c .Item _ .Item _ .Item _ .Item _ .Row See .See http://java.sun.com/j2se/1.5.0/docs/api/java/util/Stack.html .Item _ .Item _ .Item _ .Item _ .Row See .See http://java.sun.com/j2se/1.4.2/docs/api/java/util/Stack.html .Item _ .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack.plg .Item Prolog .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack.st .Item Smalltalk .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack2.lsp .Item _ .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack1.lsp .Item _ .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack.C .See http://www.csci.csusb.edu/dick/cs320/stacks/test_stack.C .Item _ .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack2.C .See http://www.csci.csusb.edu/dick/cs320/stacks/test_stack2.C .Item _ .Item _ .Item _ .Item _ .Row See .See http://www.csci.csusb.edu/dick/cs320/stacks/stack2.cc .Item _ .Item _ .Item _ .Item _ .Close.Table .Table Heading Meaning .Row Files Link to the source code .Row Language Use the book and the web to figure this out .Row Type or Object Does the code define one stack or allow the creation of stacks .Row Generic? Does the code work with only one type of data item or many .Row Correct? Can you test it? Does it look OK? Does it match the spec .See http://www/dick/cs320/stacks/stack.html ? .Close.Table . Comments You can add comments to this web page. .Close CS320 Laboratory Number 15 ADTS . Check the Preparation for next class .See ../15.html