For this assignment, You will add two new commands to the program
you wrote for Homework 5a: In addition to "exit
" and
a property name, change your program so that it recognizes the
commands, "getval
" and "show
." The
getval
command is used to display the value part of
a property list entry, and show
displays all the entries
in the property list.
Your application program must use the three functions whose prototypes
are in ~vickery/CS-200/Homework_5b/plist.h
: insert(),
getValue(), and showList(). Note that the prototype for
insert() for this assignment is slightly different from the
prototypes used for Homework_5a. You must use the new
plist.h
for this assignment, so you will have to change
the code you wrote to call insert() before.
You are also to implement the three functions listed above. For your
convenience in developing this assignment, there is a compiled
version of the solution in
~vickery/CS-200/Homework_5b/plist.o
. Your application
program must work with this version of plist.o
as well
as with the one that you write yourself. Again, the
plist.o
file for this assignment is different from the one
for Homework_5a, so be sure to use the correct one.
plist.h
" that I supplied in both
your application program and in your implementation of the Property
List package.
plist.o
that I supplied, as well as with your own.
~vickery/CS-200/Homework_5b
if you wish, or you
may write your own, or you may modify the one that I supplied. When you
submit the assignment, provide only your own source files. Do not send any
binary files or copies of my plist.h
or
Makefile
. (Of course, if your Makefile
is
different from mine, send yours.)
qcunix1> Property name or command: vickery Property type: int Property value (int): 100 Property name or command: vickery Property type: char Property value (char): x Property name or command: christopher Property type: float Property value (float): 3.14 Property name or command: wagner Property type: double Property value (double): 3.14159 Property name or command: show christopher float [3.14] vickery int [100] vickery char [x] wagner double [3.14159] Property name or command: getval Property name: vickery Property type: char Value is [x] Property name or command: exit qcunix1>