Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

QBASIC Program for Cosmo Cellular Fixed Cost Calculator, Assignments of Computer Science

The requirements for creating a qbasic program to calculate the fixed costs for cosmo cellular customers based on their coverage option, minutes package, and location. The program should use subroutines for data input, rate calculation, tax calculation, and displaying the results. Users will be prompted to select a coverage option, state or region, and minutes package. The program should then calculate the base rate, fcc charge, federal tax, state tax (if applicable), and regional tax (if applicable) to determine the total cost.

Typology: Assignments

Pre 2010

Uploaded on 08/08/2009

koofers-user-5u6
koofers-user-5u6 🇺🇸

10 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CISY103
QBASIC Programming Assignment
Read carefully all pages (1-11) included below, related to this assignment, and then
design and test a complete QBASIC program to match the expected output. You must use
subroutines as directed in the program constraints and requirements section (page 8).
Use Print Using statement to include $ sign in your output .
Submit well documented code. You also need to submit Pseudocode.
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download QBASIC Program for Cosmo Cellular Fixed Cost Calculator and more Assignments Computer Science in PDF only on Docsity!

CISY

QBASIC Programming Assignment

Read carefully all pages (1-11) included below, related to this assignment, and then

design and test a complete QBASIC program to match the expected output. You must use

subroutines as directed in the program constraints and requirements section (page 8).

Use Print Using statement to include $ sign in your output.

Submit well documented code. You also need to submit Pseudocode.

Overview

Cosmo Cellular is a new national cell phone company committed to bringing quality cell

phone service at an affordable rate.

The customer service department recently conducted a survey of new customers. The

number one complaint was that customers were unaware of the total cost of their plan

including federal and state taxes.

Your job is to write a program that will be placed on kiosks in the stores.

How to Get the Data from the user

Present the user with a menu that lists coverage options and then prompts them for

coverage ( Coverage) :

Cosmo Cellular Fixed Cost Calculator Pick coverage option: 1 - Local 2 - Regional 3 - National Enter coverage(1,2,3)?

Note: You are allowed to assume that the user will make a valid entry.

IF the user selects 1 for Local, then prompt them for state ( State$ ):

Enter state code?

Note: You are allowed to assume that the user will enter a valid state code in

upper case (NJ, NY, PA, …)

IF the user selects 2 for Regional, the display a regional menu and ask the user for their

region ( Region) :

Pick a region 1 - Northeast 2 - Southeast 3 - Midwest 4 - Southwest 5 - Northwest Enter region(1-5)?

How to Calculate Rate:

At first glance, the following may look like a table of numbers, but there is a pattern to

the numbers, which is explained below the table:

Minutes

Minutes

Minutes

Minutes Unlimited Minutes Local 20.00 24.00 34.00 39.00 46. Regional 25.00 30.00 42.50 47.50 54. National 30.00 37.00 54.50 59.50 66.

For under 1000 minutes, the Local rate is $20 + .04 * minutes

For under 1000 minutes, the Regional rate is $25 + .05 * minutes

For under 1000 minutes, the National rate is $30 + .07 * minutes

For 1000 minutes, the rate is the 350 minute rate + $

For unlimited minutes, the rate is the 350 minute rate + $

How to Calculate Tax:

The FCC Charge is $2 for all phones regardless of coverage or minutes.

FccCharge = 2

The Federal Tax is 15% of the Rate.

FedTax = Rate *.

For National Coverage, the State Tax and the Regional Tax are both 0.

StateTax = 0

RegionalTax = 0

For Regional Coverage, the State Tax is 0 and the Regional Tax is calculated as follows:

StateTax = 0

Region Tax Rate

For Local Coverage, the Regional Tax is 0 and the State Tax is calculated as follows:

RegionalTax = 0

State Tax Rate

NJ, SC, FL,

MO

NY, CA, HI 12%

All others 0

Sample Output

Cosmo Cellular Fixed Cost Calculator You have selected Regional coverage Region selected Southeast You have selected 100 Minutes Fixed Monthly Costs will be: Base rate 30. FCC Charge 2. FED Tax 4. Regional Tax 5. Total $41.

Program Constraints/Requirements

The corporate architect has heard you are writing this program and has made the

following programming requirements:

Use the following routines:

GetData

CalcRate

CalcTax

DisplayFixedCosts

For GetData, have the procedure return to main Coverage, State$, Region, Minutes

The Minutes will either be 0, 100, 350, 1000 or -1 (-1 means unlimited)

Assume the user enters good data and the state codes are all caps

For CalcRate, have the routine receive Coverage and Minutes , and have it return Rate

See the How to Calculate Rate section

For CalcTax, have the routine receive Rate, Coverage, State$, Region and have it return

FccCharge, FedTax, StateTax, RegionalTax

See the How to Calculate Tax section

For DisplayFixedCosts, have the routine receive Rate, Coverage, State$, region,

Minutes, FccCharge, FedTax, StateTax, RegionalTax

See the How to Display the Results section

Complete Run 2:

Cosmo Cellular Fixed Cost Calculator Pick coverage option: 1 - Local 2 - Regional 3 - National Enter coverage(1,2,3)? 2 Pick a region 1 - Northeast 2 - Southeast 3 - Midwest 4 - Southwest 5 - Northwest Enter region(1-5)? 1 Select Minutes Package 0 - No included minutes 1 - 100 Minutes 2 - 350 Minutes 3 - 1000 Minutes 4 - Unlimited minutes Enter Minutes Package(0-4)? 4 Cosmo Cellular Fixed Cost Calculator You have selected Regional coverage Region selected Northeast You have selected Unlimited minutes Fixed Monthly Costs will be: Base rate 54. FCC Charge 2. FED Tax 8. Regional Tax 2. Total $67.

Complete Run 3:

Cosmo Cellular Fixed Cost Calculator Pick coverage option: 1 - Local 2 - Regional 3 - National Enter coverage(1,2,3)? 3 Select Minutes Package 0 - No included minutes 1 - 100 Minutes 2 - 350 Minutes 3 - 1000 Minutes 4 - Unlimited minutes Enter Minutes Package(0-4)? 2 Cosmo Cellular Fixed Cost Calculator You have selected National Coverage You have selected 350 Minutes Fixed Monthly Costs will be: Base rate 54. FCC Charge 2. FED Tax 8. Total $64.