Variable-Length Record Addition Demos
The following demonstrations show the additions of variable-length records to a book file by using an avail list.
The first interface requests users to download a book information file and then select an option to use the system.
One example of the downloaded file avail.txt
is
File Structures: An Object-Oriented Approach with C++|0201874016|94.80|360|
Learning WML & WMLScript|1565929470|17.48|12|
XML in a Nutshell, 2nd Edition|0596002920|39.95|39|
Java and XSLT|0596001436|26.37|890|
WAP Servlets: Developing Dynamic Web Content With Java and WML|047139307|32.99|4|
WAP Development with WML and WMLScript|0672319462|18.99|56|
Advances in Security and Payment Methods for Mobile Commerce|1591403456|89.95|182|
M Commerce: Technologies, Services, and Business Models|0471135852|23.09|5|
where
- each record is with a variable length,
- each record has four variable-length fields:
title
, ISBN
, price
, and quantity
,
- the character ‘|’ is the field delimiter, and
- each record is ended with a newline ‘\n’.
Note that these demonstrations only show variable-length record additions, but not deletions.
The file avail.txt
will not work for these demonstrations.
You may download the file avail1.txt
or avail2.txt
in the next slide for demonstrations.