// // Here is a sample command file for a bag // of strings // ADD hello ADD goodbye ADD hello ADD hello DISTINCT PRINT COUNT OCCURS hello OCCURS goodbye OCCURS oh no ADD bob REMOVE hello MAX PRINT // // Here is the output that might be generated for the command file above. // Note that all commands are echoed. // ADD hello ADD goodbye ADD hello ADD hello DISTINCT The bag contains 2 distinct item(s) PRINT The bag contains 4 item(s) The bag contains 2 distinct item(s) (3) hello (1) goodbye COUNT The bag contains 4 item(s) OCCURS hello There are 3 item(s) with value hello OCCURS goodbye There are 1 item(s) with value goodbye OCCURS oh no There are 0 item(s) with value oh no ADD bob REMOVE hello REMOVE mary mary is not in the bag MAX hello occurs the maximum number of times (2) PRINT The bag contains 4 item(s) The bag contains 3 distinct item(s) (2) hello (1) goodbye (1) bob