Wednesday, February 10, 2016

Lift Ticket Project

Have you bought lift tickets at a ski resort lately? There are a lot of options. Different age groups, different days (week days, weekends, holidays) and different options for how long you will be skiing or which hills you will be on. I can’t imagine any of this working without computer terminals. Well not without having smart people taking time that you don’t want them to take. So obviously this is a good programming project.

I’m working with decision structures with my programming students. I was trying to think of something new to do. Something that would involve if statements with a little complexity and that might I thought of lift tickets. Off I went to the website of a ski resort I have enjoyed (Bretton Woods in NH) and took a snapshot of their rates. The whole thing is more complicated than I wanted for now so I just recorded the weekend rates for full-day, the various age groups and the different prices for resort guests and non-guests. I asked the students to put together a program to ask for an age, resort stay status, and show the price for a single ticket.

clip_image002There are four age ranges not including younger than 5 and older than 79 which are groups that ski/ride for free. Having the two options for each age group almost forces nested if statements. Almost but not quite.

The thing I may like most about this project is that there are many possible ways to solve it. So far I seem to have almost as many different solutions as I have students. Even better – not all of them work in all cases. Our next class is going to involve looking at different solutions and discussing them.

It should make for an interesting class.


Garth said...

These projects initially seem simple. Then they are not. I have lots of those ideas.

I pay $32 for a full day at Lost Trail. The other resort I go to I have to pay $42. Big bucks. Skiing in Montana is comparatively cheap except at Big Sky which is out-of-staters and yuppies only.

Alfred C Thompson II said...

Prices in New England are high. We're looking to buy a place in the mountains and if we do a season pass become practical and would save money.

Unknown said...

This is a great project! Engaging for the kids and with multiple solution paths. My mind went to wondering if I would get good results if I asked the kids to come up with their own menu of prices, and then write the program they would use in the ticket booth to sell them.

Garth said...

Several years ago I had one of my advanced classes go to a restaurant and look at the touch screen the waiters use to enter orders. We mocked up what would be necessary to code it. There are several layers of complexity in these apps, not just buttons for food items. It was a good exercise looking at what is behind the obvious.