School of Engineering and Applied Science
Department of Computer Science
CSci 53 -- Introduction to Software Development
http://www.seas.gwu.edu/~csci53/spring04
Alice Armstrong

Project 3
due Thursday 2/12/04

Specification:
Getting a ship through the Panama Canal is a complex problem. The route is heavily traveled and the locks are much narrowwer than many cargo and passenger ships now made. Write an application that could help the dock manager answer frequently asked questions about scheduling a trip through the canal.

Your program should interactively ask questions of the user until it is able to determine

  1. the estimated time to complete the passage (from arriving at the port on the Atlantic side and exiting the last lock on the Pacific side)
  2. the total cost (transit visa fees, inspection fees, quarintine fees, etc.)
  3. any time restrictions on travel
  4. any additional paper work required

Below is the list of constraints in no particular order. Note that you should focus on deciding which question to ask first so that you minimize the number of questions you need to ask the user. Think carefully about organization. Try reordering these constraints on paper before you write any code.

Here are a few sample runs of the program:


>How wide is your ship (in yards) at its widest point?
57 >I'm sorry, the canal cannot accommodate your vessel.

>How wide is your ship (in yards) at its widest point?
43
>Is the purpose of your passage strictly tourism?(y or n)
y
>Schedule: M-F 3:30pm-8pm and Sat, Sun 10am-7pm
>Travel time: 4 hours
>Cost: $1000
>Inspections: Standard immigration


>How wide is your ship (in yards) at its widest point?
4.2
>Schedule: Sat, Sun 10am-7pm
>Travel time: 4 hours
>Cost: $1000
>Inspections: Standard immigration


>How wide is your ship (in yards) at its widest point?
46.1
>Is the purpose of your passage strictly tourism? (y or n)
n
>How would you describe your cargo: produce (P), livestock (L), >dry goods (D), or raw materials (M)?
M
>Schedule: M-F 8pm-3am
>Travel time: 4 hours, 20 minutes
>Cost: $1600

Notes about Testing
You should show a test case for each possible scenario. Your output need not look exactly like this example. You are free to design the questions you ask and the way you present the information to the user, but you must be clear.


(end of assignment)