cs445 - Spring 2011

Project - Questions And Answers


Many thanks to the following students who have contributed questions for this section:

  • Claire Simmonds
  • Rachel Walker
  • Jaime Sahagun
  • Marcos Arroyo

Q: Before performing any actions, such as updating projected views or booking inventory, does the employee need to be logged in?

A: Yes, please include logging on into your use cases.

Q: How are projected page views calculated?

A: It doesn't really matter, since one cannot really know what the real number of page views will be. If the projected number is too low, then there will be lost revenue; of the projected number is too high, and all gets sold, then the website won't be able to deliver on what it's sold.

Q: How is projected inventory calculated?

A: Let's say in "Sports" you have two ads per page, a 300x250 and a 728x90. Let's also assume you're projecting one million (1M) page views for the "Sports" section. Then, the inventory you have available for selling is 1M impressions for the 300x250 and another one million impressions for the 728x90.

Q: How is the CPM computed? What factors determine the cost? Will we be given a list of prices that the owner specifies?

A: The CPM is not computed, it's just the price the website owner thinks she can get from advertisers.

Q: What placements are available?

A: Any placements you want. If you're the owner of the website, then you can design your site any way you want, though not all design will be equally successful in bringing in advertising revenue. Say you decide to have all the ads BTF (Below The Fold), which really means the end user will have to scroll down in order to see the ads; well these placements won't be very appealing to advertisers.

Q: In order to book, do sales people contact clients or do clients contact sales people?

A: It doesn't really matter. In reality it goes either way. High-profile sites -- think the Wall Street Journal, the New York Times, the Huffington Post, etc. -- have a lot of advertisers who want their inventory, though sometimes even these websites don't manage to sell everything they want; advertisers want the home page, but don't necessarily care about some obscure section on the site.

Q: Are there any requirements for cancelling a booking? For example, can clients only cancel a certain number of days after ordering, must they provide a reason, etc.?

A: This is an excellent question. As you can imagine, the closer you get to the start date, the harder it will be to sell the canceled inventory, which is why websites don't want to allow cancellations very close to the start date. So, here are the rules for cancellations:
  • 30+ days before the start date: no penalty
  • Between 15 and 30 days before the start date: 50% penalty
  • Less than 15 days from the start date: 100% penalty

Q: When the employee in charge of ad operations inputs a date, will the date be a single day or a span of days (e.g. 2 weeks, 1 month, etc.)?

A: Single day.

Q: Does an advertiser have to buy impressions for a whole section or can they only purchase for a particular sub-section (e.g. "News Local")?

A: They can buy either way. Some of they may say "I want one million impressions in News for the month of April 2011", whereby others may be a lot more specific and say something like "I want all the impressions in News Local" during the week before the general elections".

Q: Can a sales person get a listing of the projected and available inventory for any section, sub-section, placement, or date... or must the sales person give all of the aforementioned information to get one particular inventory?

A: You can get the listings with just partial information. For example, if you only specify a date, then you'll get a listing broken down by sections, sub-sections, booked, etc.

Q: How should we notify the sales person who created the sale and the VP of sales (e.g. e-mail, message when they next log in, etc.)?

A: In real life this would be something like email notification. For the project this will be just a message sent to stdout saying "Notification sent to X and Y", whoemever X and Y may happen to be; this is to make sure you don't have to mess up with setting an email gateway and such.

Q: How should we maintain state between sessions?

A: The easiest way is to serialize all objects that matter and save them to file(s) on exit. When you start the application you can test for the existance of that file and restore objects from it. A very good introduction on serialization can be found here.

Q: What is the list of commands we need to implement?

A: See the list in the table below.
Command Required?
inventory-add Y
inventory-show Y
inventory-load Y
user-add Y
user-show Y
user-change N
user-set Y
user-remove N
placement-add Y
placement-show Y
placement-remove Y
booking-add Y
booking-show Y
booking-cancel Y
booking-commit Y

Q: Can you provide a list of commands and their arguments?

A: See the list below

inventory-add [section [sub-section]] [date] amount

If no section, sub-section, date is provided, then the default is all sections and sub-sections, today’s date. 'amount' can be a positive or negative integer.


inventory-show [section [sub-section]] [date]

If no section, sub-section, date is provided, then the default is all sections and sub-sections, today’s date.


inventory-load file


user-add name role ...



Show all users.



Sets the user that executes commands.


placement-add dimensions placement-name


placement-add "728x90" "footer"




booking-add section sub-section date placement CPM client


booking-add "News" "International" "2011-07-20" "footer" 300000 3.45 "ACME Networking"


booking-show [section [sub-section]] [date]

If no section, sub-section, date is provided, then the default is all sections and sub-sections, today’s date


booking-cancel section sub-section date placement CPM client


booking-cancel "News" "International" "2011-07-20" "footer" 300000 3.45 "ACME Networking"


booking-commit section sub-section date placement CPM client


booking-commit "News" "International" "2011-07-20" "footer" 300000 3.45 "ACME Networking"


Q: Who has the right to do what in the system

A: The table below provides the answer.
Role Users Inventory
adminview, create, update, delete  
ownerview, update book; view/cancel any booking, including committed inventory
adoperations  add/view/modify projected inventory; view bookings
accountingview view projected inventory and bookings; can change bookings to committed inventory
salesview view projected inventory; create booking; view/modify/cancel own bookings; cannot modify or cancel committed inventory
vpsalesview view projected inventory; create booking; view/modify/cancel any bookings -- including committed inventory -- created by herself or her employees in Sales

$Id: QandA.html,v 1.7 2011/04/07 20:56:55 virgil Exp $