Presentation is loading. Please wait.

Presentation is loading. Please wait.

Instructions for Lab-14 CS-139, Sections 3 & 4 Fall 2001.

Similar presentations


Presentation on theme: "Instructions for Lab-14 CS-139, Sections 3 & 4 Fall 2001."— Presentation transcript:

1 Instructions for Lab-14 CS-139, Sections 3 & 4 Fall 2001

2 Lab-14 Write a program that performs the following operations:
Queries a traveler for ticket purchase Lake Woebegone, Minnesota to Oshkosh, Wisconsin: which class does traveler want to fly? Choices are First Class, Business Class, Tourist Class. Traveler has the option of bringing a spouse in the same class Spouse’s ticket is half price. Traveler + Spouse can also bring either one child under the age of three at no charge, and one child under the age of ten at 1/ the price of Traveler’s ticket, or two children under the age of ten at 1/3 each. Both types of children’s discounts are available either in First Class or in Tourist, but NOT in Business Class. Additional children will also be accommodated, but at full price. Prices for first traveler are: $1,200 (first class), $800 (business class), $600 (tourist class). (continued)

3 Lab-14 (continued) Output total price. Make all messages nice.
Use at least one “switch” statement, in such a way as to demonstrate the various capabilities of the facility as shown in class. Use a separate procedure to query input, and a separate procedure to generate final output.


Download ppt "Instructions for Lab-14 CS-139, Sections 3 & 4 Fall 2001."

Similar presentations


Ads by Google