The following is a minimal set of commands that will be run in order to test your application and the expected output. The dollar sign denotes a UNIX prompt while the > denotes the application prompt. User entered commands are denoted in bold.
For purposes of exemplification It is assumed that the application is written in Java and that the name of executable is ims (Inventory Management System).
$ java imc
>
> show-user
User "Administrator", role "admin"
> show-inventory "News"
You may not perform this operation.
> add-user "John Doe" "owner"
User "John Doe" added, role "owner"
> add-user "Alice" "VP Sales"
User "Alice" added, role "vpsales"
> add-user "Matt D" "sales"
User "Matt D" added, role "sales"
> add-user "Bob" "adoperation" "accounting"
User "Bob" added, roles "adoperations", "accounting"
> add-user "Mario Z" "sales"
User "Mario Z" added, role "sales"
> show-user "John Doe"
"John Doe", roles "owner"
> show-user
User "John Doe", roles "owner"
User "Alice", role "VP Sales"
User "Matt D", role "sales"
User "Bob", roles "adoperations", "accounting"
User "Mario Z", role "sales"
User "Administrator", role "admin"
> user "Alice" # all subsequent commands will be executed as Alice until a new "user" command
User "Alice", role "VP Sales"
> add-inventory "News" "International" "2008-07-14" 300000
You may not perform this operation.
> user "Bob"
User "Bob", roles "adoperations", "accounting"
> add-inventory "News" "International" "2008-07-14" 300000
Added 300000 to "News" "International" on "2008-07-14". Total projected: 300000. Total booked: 0.
> add-inventory "News" "International" "2008-07-14" 150000
Added 150000 to "News" "International" on "2008-07-14". Total projected: 450000. Total booked: 0.
> add-inventory "News" "International" "2008-07-14" -200000
Added -200000 to "News" "International" on "2008-07-14". Total projected: 250000. Total booked: 0.
> add-inventory "News" "International" "2008-07-15" 175000
Added 175000 to "News" "International" on "2008-07-15".
Total projected: 175000. Total booked: 0.
> add-inventory "Sports" "Baseball" "2008-07-15" 620000
Added 620000 to "Sports" "Baseball" on "2008-07-15". Total projected: 620000. Total booked: 0.
> add-inventory "Sports" "Baseball" "2008-07-16" 840000
Added 840000 to "Sports" "Baseball" on "2008-07-16". Total projected: 840000. Total booked: 0.
> add-inventory "Sports" "Soccer" "2008-07-15" 180000
Added 180000 to "Sports" "Soccer" on "2008-07-15". Total projected: 180000. Total booked: 0.
> show-inventory "Sports" "Soccer" "2008-07-16"
"Sports", "Soccer", "2008-07-16". Total projected: 0. Total booked: 0
> show-inventory "Sports"
"Sports", "Baseball", "2008-07-15". Total projected: 620000. Total booked: 0
"Sports", "Baseball", "2008-07-16". Total projected: 840000. Total booked: 0
"Sports", "Soccer", "2008-07-15". Total projected: 180000. Total booked: 0
> book-inventory "News" "International" "2008-07-20" 300000
You may not perform this operation.
> user "Matt D"
User "Matt D", role "sales"
> book-inventory "News" "International" "2008-07-20" "728x90" 300000 3.45 "ACME Networking"
Inventory not available.
> book-inventory "News" "International" "2008-07-14" "728x90" 140000 3.45 "ACME Networking"
Booked 140000 of "728x90" on "News" "International" "2008-07-14" for "ACME Networking". CPM: $3.45. Total revenue: $483.00.
> show-inventory "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 140000.
728x90 Total available: 110000
"News", "International", "2008-07-15". Total projected: 840000. Total booked: 0
> book-inventory "News" "International" "2008-07-14" "300x250" 250000 5.00 "TheSleepless"
Booked 250000 of "300x250" on "News" "International" "2008-07-14" for "TheSleepless". CPM: $5.00. Total revenue: $1,250.00.
> show-inventory "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 390000.
728x90 Total available: 110000
300x250 Total available: 0
"News", "International", "2008-07-15". Total projected: 840000. Total booked: 0
> show-booked "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 390000.
728x90 Booked: 140000 CPM: $3.45. Client: "ACME Networking"
300x250 Booked: 250000 CPM: $5.00. Client: "TheSleepless"
> user "Mario Z"
User "Mario Z", role "sales"
> show-booked "News"
You have no bookings in "News"
> book-inventory "News" "International" "2008-07-14" "728x90" 100000 4.10 "One Pizza"
Booked 100000 of "728x90" on "News" "International" "2008-07-14" for "One Pizza". CPM: $4.10. Total revenue: $410.00.
> show-booked "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 490000.
728x90 Booked: 100000 CPM: $4.10. Client: "One Pizza"
> show-inventory "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 490000.
728x90 Total available: 10000
300x250 Total available: 0
"News", "International", "2008-07-15". Total projected: 840000. Total booked: 0
> user "Alice"
User "Alice", role "VP Sales"
> show-booked "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 490000.
728x90 Booked: 140000 by "Matt D". CPM: $3.45. Client: "ACME Networking"
728x90 Booked: 100000 by "Mario Z". CPM: $4.10. Client: "One Pizza"
300x250 Booked: 250000 by "Matt D". CPM: $5.00. Client: "TheSleepless"
> quit
Current state saved in file ims-20080417-1231.
Good bye!
$
$ java imc ims-20080417-1231
>
> show-user
User "Alice", role "VP Sales"
> show-inventory "News"
"News", "International", "2008-07-14". Total projected: 250000. Total booked: 490000.
728x90 Total available: 10000
300x250 Total available: 0
"News", "International", "2008-07-15". Total projected: 840000. Total booked: 0
> quit
Current state saved in file ims-20080417-1249.
Good bye!
$