University of Calgary

bike shop

Bike Shop 
source: Tino Duong, 2003

Description

You have just returned home from a backpacking/biking adventure in Europe. You have so much fun on your trip that once you got home to Calgary you decided to open your own bike shop in order to cater to the tourist. You bike shop is a modest size store that sells, fixes and rents bicycles.

The prices for you bikes vary during peek seasons.

(So for the summer, you would charge $7.50 per bike, per day)

As a promotional deal, if they customers rent the bikes for 7 or more consecutive days, then they get a %25 discount.

Due to your determination and low prices, you shop is a hit and customers from all over the world come to rent bikes. Unfortunately, the stores success is growing too fast and you soon find the need to have a computer system that will help you keep track of the bike rentals

Requirements

Write a computer program that prints an invoice for the user. The program must prompt the user for the Season, the number of bikes and the number of days they wish to rent for.

The Invoice is printed to the command line, and should look similar to this:


Tino's Bike Shop: INVOICE
--------------------------

Number Bikes: 5
Number Days : 7
Season: Spring, cost per day $5
Discounted Price $131.25

Additional/Optional Requirements

Instead of just printing out an invoice. Create a rental system that checks out bikes and checks them in. This system will store the user's personal information, such as their name, credit card number, check out and check in date. Write this information to a database text file called db.txt

Concepts

User input/Output
Functions
Looping structures
 

Additional Concepts

File Input/Output



Updated: August 31, 2005 02:47 PM