Home » Programming » 10 - Sample Applications
10

Sample Problems

Describing different type of problems, offering readers to use their newly aquired programming skills to solve those problems

Now that you are pretty much aware of the basics, logic, and concepts in programming, why not put your skills to the test? You should have fun programming! In this chapter, you will be able to explore the possibilities in programming. You may discover a hidden programming talent within you or you may find out a new hobby while you are immersed in this chapter. Enjoy programming and congratulations on finishing this tutorial!

Problems

1. You are asked to devise a software program for a speed dating event. In order to make the event successful, the boys and the girls have to be balanced. Any extra girl or extra boy will not be admitted to the event. Any late participant will also not be admitted to the event. It is given that the number of girls and the number of boys show up at the event. The whole event can only accomodate up to forty people. You have to devise a program to seat the qualified guests and find out the maximum revenue for the night. Each seated participant is charged $20.

 

www.fastlife.com, an international speed dating site that is attuned to the latest software trends. The Fast Life website boasts of cutting edge online social technology for today's yuppie on the go .

2. You are a software engineer for a theme park with ten roller coasters. The standard time people will spend on the roller coasters are the following: roller coaster one takes twenty minutes, roller coaster two takes eighteen minutes, toller coaster three takes fifteen minutes, roller coaster four takes twenty two minutes, roller coaster five takes nineteen minutes, roller coaster six takes twenty eight minutes, roller coaster seven takes twenty three minutes, roller coaster eight takes, sixteen minutes, roller coaster nine takes fourteen minutes, and roller coaster ten takes only twelve minutes. The theme park is open from ten o'clock in the morning until ten o'clock in the evening. Since the lines in the roller coasters at the theme park change on different times of day, the time per roller coaster varies. The time function for each roller coaster follows the formula f(x) = cosine + 15. Every guest at the theme park is only allowed two hours in the park. You have to make a software program that will allow every guest to have as many roller coaster rides as possible within the two hour period. Your software program will be installed at the ticket booth of the theme park. It will advise the guests their optimal path for roller coaster riding. 

www.sixflags.com, Six Flags boasts of tons of roller coaster rides. The Viper roller coaster shown here is one of the most thrilling roller coasters in the world. It is located in the Magic Mountain Theme Park, Los Angeles .

3. You are the chief software programmer at a bank. You have to make a software program that will calculate the highest yielding bank product at any given moment. The bank products consist of savings accounts, checking accounts, atm accounts, and passbook accounts. The yield on savings accounts follow a normal distribution, checking accounts follow a gamma distribution, atm accounts follow a beta distribution, while the passbook accounts follow a hypergeometric distribution. The far left of the distribution curve represents the start of the day at twelve midnight and the far right of the distribution curve represents the end of the day at twelve midnight also. The bank is open twenty four hours a day and clients can access their accounts any time. Your software program must be able to tell the customer which account is currently yielding the highest rate at any given second. (Hint: If you are using Visual Basic, use the built in statistical subprograms)

www.citibank.com, Citibank is clearly the world's largest bank. It relies on a lot of programmers to make sure the information infrastructure is always ready to seize financial opportunities.