Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT 1. Create a Visual Basic program for Okc Tours and Time to Burn Calories based on the provided Excel interface and accompanying flowcharts. Do

ASSIGNMENT 1. Create a Visual Basic program for Okc Tours and Time to Burn Calories based on the provided Excel interface and accompanying flowcharts. Do not forget to test your programs to ensure it is working properly. Upload the code and answer the accompanying questions. Instructions for Preparing the Assignment Deliverables: 1. Visual Basic Code. Include a visual basic comment line near the top of your code that states your name. Copy this code and place it in the Complete Code question on Canvas. (Note: Your code should include Option Explicit and contain both Okc Tours and Time to Burn Calories.) 2. Excel File. Upload your Excel file containing the VBA programs. 3. Use your Okc Tours code to answer questions Okc Tours 1 through Okc Tours 5 (DO NOT INCLUDE $ or , in your result. I.E. $1,000.00 should be entered as 1000.00) 4. Use your Calories to Burn code to answer questions Calories 1 through Calories 3

OKC Tours Programming Project

Assume you have just been hired by the manager of OKC Tours (OKCT), a small company located in Oklahoma City. OKCT specializes in providing tour buses and guides to tour groups desiring to travel through some of Oklahomas historic sites. OKCT holds tours for groups ranging from 15 to 130 people (including 15 people and 130 people tours), assume that the program user will know to only enter values between 15 and 130 people (inclusive). (This means you dont have to worry about error-checking.)

Two types of buses are available for use: small buses (45 maximum tourists per bus) and large buses (65 tourists per bus). OKCT has two small buses and two large buses; tour groups can use only combinations of two buses at a time.

There are five tour bus options with each option using a different bus pairing as shown in Table 1.

Option

Min and Max Tourists

# of Buses Small Big

Per Bus Price

Base * Qty

 350 450 700 800 900 
  1. 1 min tourists 15 1 0 350 max tourists 45

  2. 2 min tourists 46 0 1 450 max tourists 65

  3. 3 min tourists 66 2 0 350 max tourists 90

  4. 4 min tourists 91 1 1 350

max tourists 110 450

5 min tourists 111 max tourists 130

0 2

450

Table 1. Bus Combinations and Associated Pricing

To help you better understand the information summarized in the table, OKCT provided you with a description of their pricing structure. For each bus, there is a base usage price that includes a driver and tour guide for any tour up to and including five hours in duration. (All hour calculations are rounded to the nearest whole hour.) Each small bus has a base price (SBP) of $350 and each large bus has a base price (LBP) of $450. For tours longer than 5 hours in duration, typically 25% of the base price is added for each hour above 5 hours, but no more than 4 hours above the 5 hours base are charged per day. Again, even for tours lasting longer than 5 hours, the tour length is rounded to the nearest whole hour.

The table below shows a few example price calculations. The base prices and additional hourly percentage rates are subject to change at any time, thus your spreadsheet and code should allow for the modification of these rates.

2

Duration in hours

Total Price Calculation

3 5 6 8

base price

base price

base price + (1 * 0.25 * base price)

base price + (3 * 0.25 * base price) Table 2. Example Pricing Calculations

Your task is to create a program (based on the provided flowchart) that will pick the least-price bus combination. It should also calculate the final price for a tour group. Your program should accept the number of tourists (P), the tour duration (you can assume this will always be entered as an integer), the base rates for each bus size, and the extra hourly percentage (EHP) and then calculate the price components and total price for the most efficient tour bussing option per day. If there is a multi-day tour, the program will be run for each day of the multi-day tour. Thus, your program does not need to support calculations for more than one day at a time.

Your program should display the number of small buses (NSB) needed and the number of large buses (NLB) needed, including the small bus price extension (SE = NSB * SBP) and large bus price extension (LE = NLB * LBP). The program should also show the extra charged hours (ECH), if any, over five. It should also display the extra- small-bus price (SEHC) and the extra-large-bus price (LEHC) based on the hours over five hours. It should also display the total small bus price (TSBP) and total large bus price (TLBP), and the total price of the tour (TP).

Note that the user will enter the number of people (P) and the number of hours (H) each time the program is run. But the pricing parameters are usually stable, so the values for these parameters will not be entered by the user each time. The visual basic code should accept the values of P and H into variables. It should do the same for the value of the pricing parameters from the pricing parameters cells as well.

In your code, use the variable abbreviations defined above and shown on the user interface. For example, use TSBP and TLBP for total-small-bus price and total-large- bus price respectively.

3

4

OKC Tours Sample Interface

5

Calories to Burn

Assume you are a fitness trainer and would like to help your clients better calculate the number of calories they burn on your treadmill. Your treadmill burns 8.9 calories per minute.

You desire to create a program which asks the person to enter the desired number of calories to burn and output the number of minutes required on your treadmill.

Note: They might burn slightly more calories than their goal unless their goal is a multiple of 8.9

Calories to Burn Sample Interface

6

Calories to Burn Flowchart

7

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial Institutions Management A Risk Management Approach

Authors: Anthony Saunders, Marcia Cornett

7th Edition

0073530751, 9780073530758

More Books

Students also viewed these Finance questions

Question

What is the biggest strength of the program?

Answered: 1 week ago

Question

2. Answer the question, Who should do the appraising?pg 87

Answered: 1 week ago

Question

1. Explain the purpose of performance appraisal.pg 87

Answered: 1 week ago