Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

An Internet service provider has three different subscription packages for its customers: Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2.00 per hour. Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1.00 per hour. Package C: For $19.95 per month unlimited access is provided. Write a program that calculates a customer’s monthly bill. It should ask the user to enter the letter of the package the customer has purchased (A, B, or C) and the number of hours that were used. It should then display the total charges.

Using Visual Basic I need help finishing this code this is what I got so far

Dim decpackageA As Decimal
Dim decpackageA1 As Decimal
Dim decpackageB As Decimal
Dim decpackageB1 As Decimal
Dim decpackageC As Decimal
Dim inthours_worked As Integer
Dim dectotal_chargespackageA As Decimal
Dim dectotal_chargespackageB As Decimal
Dim dectotal_chargespackageC As Decimal
Dim dbltotal_charges As Double


'Assign the textbox values to variables
decpackageA = inthours_worked < 10 = 9.95
decpackageA1 = inthours_worked > 10 = 9.95 * 2
decpackageB = inthours_worked < 20 = 14.95
decpackageB1 = inthours_worked > 20 = 14.95 * 1
decpackageC = inthours_worked > 0 = 19.95
dectotal_chargespackageA = decpackageA Or decpackageA1
dectotal_chargespackageB = decpackageB Or decpackageB1
dectotal_chargespackageC = decpackageC


TextBox3.Text = "$" + dbltotal_charges.ToString()
TextBox3.Text = "$" + decpackageA.ToString()
TextBox3.Text = "$" + decpackageB.ToString()
TextBox3.Text = "$" + decpackageC.ToString()
TextBox3.Text = "$" + dectotal_chargespackageA.ToString()
TextBox3.Text = "$" + dectotal_chargespackageB.ToString()
TextBox3.Text = "$" + dectotal_chargespackageC.ToString()

I keep getting 0 as the total charges where did I go wrong im using visual basic 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education