SE 598, Data Structures and Algorithms

STL Map-Multimap Programming Assignment, due 5:00 p.m. Wednesday, 19 August


Introduction

The last assignment added to readmbox a new version of the order command. This assignment adds to readmbox a new version of the delete command.

Problem Statement

The delete command deletes messages from the message list. Currently, the delete command has two forms:
delete label word
to delete messages containing word in header fields, and
delete
to restore the deleted messages, if any, to the message list. In this assignment you'll add a third format for the delete command.

The new delete command format is

delete word op word
where op indicates either and or or.

The sequence word1 and word2 corresponds to any message that has both word1 and word2 in its header. The two words do not have to appear in the same field, they just have to appear in the header. The command

delete word1 and word2
deletes all messages that have both word1 and word2 in their header. For example, the command
delete money and bulk
would delete the message
Subject: Make money fast.
Priority: bulk

blah blah blah
but not the message
Subject: Make body fast.
Priority: spam

Too skinny?  Add bulk in minutes with very little money blah blah blah
because the message header contains neither "money" nor "bulk"

The sequence word1 or word2 corresponds to any message that has either word1 and word2 in its header. The two words do not have to appear in the same field, they just have to appear in the header. The command

delete word1 or word2
deletes all messages that have either word1 and word2 in their header.

The delete command doesn't change when it has zero or two arguments; this assignment just adds a new behavior when the delete command has three arguments.


This page last modified on 1 August 2000.