Question

In: Computer Science

how can i get the code for this problem in visual basic? Create a Windows Forms...

how can i get the code for this problem in visual basic? Create a Windows Forms applications called ISP (Internet Service Provider) Project. You must enter the number of hours for the month and select your desire ISP package. An ISP has three different subscription packages for it's customers:

Package A: For $9.95 per month 10 hours of access are provided. Additional hours are $2 per hours.
Package B: For $13.95 per month 20 hours of access are provided. Additional hours are $1 per hours.
Package C: For $19.95 per month unlimited access is provided.

The program should also calculates and display the amount of money Package A customers would save if they purchased Package B or C, and the amount of money Package B customers would save if they purchase Package C. If there would be no savings, no message should be displayed.
thank you

can the options be display without using a radio button for the choose

Solutions

Expert Solution

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Here a new Windows Forms Application in VB is created using Visual Studio 2017 with name "VB_InternetServiceProvider".This application contains a form with name "Form1.vb".Below are the files associated with form1.

1.Form1.vb[Design]

2.Form1.vb

Public Class Form1 'Calculate button click
Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
'declaring variables
'taking hours entered by user
Dim hours As Double = Double.Parse(txtNumHours.Text)
Dim packageACost As Double
Dim packageBCost As Double
Dim cost As Double 'variable to store cost
'taking selected package
Dim package As String = cmbPackage.SelectedItem.ToString()
'checking which package is selected
If package = "Package A" Then
'calculate package A cost
packageACost = 9.95 + (hours - 10) * 2
'package B cost
Dim B As Double = 20 + (hours - 20) * 1
Dim saveCost As Double 'variable to store package save cost
saveCost = packageACost - B
If saveCost > 0 Then
'display package A cost on label
lblDetails.Text = "Package A cost $" & packageACost.ToString("0.00") & Environment.NewLine & "For package B " & saveCost & " must be saved " & Environment.NewLine & "For Package C " & (packageACost - 19.95).ToString("0.00") & " must be saved"
Else
'display package A cost on label
lblDetails.Text = "Package A cost $" & packageACost.ToString("0.00") & Environment.NewLine & "For Package C " & (packageACost - 19.95).ToString("0.00") & " must be saved"
End If

ElseIf package = "Package B" Then
'calculate package B cost
packageBCost = 20 + (hours - 20) * 1
'display package A cost on label
lblDetails.Text = "Package B cost $" & packageBCost.ToString("0.00") & Environment.NewLine & "For Package C " & (packageBCost - 19.95).ToString("0.00") & " must be saved"
Else
'display package C cost on label
lblDetails.Text = "Package C cost for unlimited access is $19.95"
End If
End Sub
End Class

======================================================

Output : Run application using F5 and will get the screen as shown below

Screen 1 :

Screen 2:When package A is selected

Screen 3:When package B is selected

Screen 4:When package C is selected

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.


Related Solutions

Create code In visual Basic, Windows forms that uses case statements to convert the day of...
Create code In visual Basic, Windows forms that uses case statements to convert the day of the week (entered by the user into an integer. (Sunday = 1, Monday = 2, etc.) For this code, think about error checking. What will your code do if the user enters “dog” for example (which is not a day of the week)? What will your code do if the user enters a number or other incorrect input?
Windows Forms application using Visual Basic: Create a class called Character that a role-playing game might...
Windows Forms application using Visual Basic: Create a class called Character that a role-playing game might use to represent a character within the game. A character should include six stats as instance variables – strength, dexterity, constitution, intelligence, wisdom and charisma (all types are int). Your class should have a constructor that initializes these six instance variables. Provide Properties with an appropriate set and get block for each instance variable. In addition, provide a method named getStatsTotal that calculates the...
windows forms Application using Visual Basic use visual basic 2012 Part 1: Programming – Income Tax...
windows forms Application using Visual Basic use visual basic 2012 Part 1: Programming – Income Tax Application 1.1 Problem Statement Due to upcoming end of financial year, you are being called in to write a program which will read in a file and produce reports as outlined. Inputs: The input file called IncomeRecord.txt contains a list of Annual income records of employees in a firm. Each record is on a single line and the fields are separated by spaces. The...
Must be in Visual C# using windows forms : Create an application that opens a specified...
Must be in Visual C# using windows forms : Create an application that opens a specified text file and then displays a list of all the unique words found in the file. Hint: Use a LINQ method to remove all duplicate words.
how can i convert this to work in visual basic ? what are the formulas for...
how can i convert this to work in visual basic ? what are the formulas for that? You must create a Windows Forms application as the Conversion project including a picture of money on your form.  Create a textbox for the user to entry a dollar amount. Determine the number of quarters, dimes, nickels, and pennies using label controls to display the results.  In your calculation, you should use constant variables. ex) Enter dollar amount for conversion of 4.69 Number...
I am trying to write code for a program in Visual Studo using Visual Basic programming...
I am trying to write code for a program in Visual Studo using Visual Basic programming language that computes the factorial of an entered number by using a For Loop. My problem is that it keeps re-setting the variable for Factorial. Below is my code if anyone can help. I want it to multiply the given number by that number - 1, then continuing to do so until it hits zero without multiplying by zero. Private Sub BtnCalculate_Click(sender As Object,...
Visual Basic Your first job is to create a visual basic project that will display the...
Visual Basic Your first job is to create a visual basic project that will display the name and telephone number for the contact person for the customer relations, marketing, order processing, and shipping departments. Include a button for each department. When the user clicks on the button for a department the program(in code for specific button will display the name and telephone number for the contact person in two labels. The same two labels will be used for each department...
Code, pls. Thank you. Exercise - MPG Calculator Create a Windows Forms application and call it...
Code, pls. Thank you. Exercise - MPG Calculator Create a Windows Forms application and call it MPGCalculator Build a form that looks like the form in the video provided. The form consists of 4 labels, 2 textboxes and 3 buttons Name all controls properly. Certain labels do not have to be named Pay attention to video and set all design time properties accordingly. The "x" should be a hot key for the exit button When Calculate is clicked, you should...
I need the c# code for the below assignment. Complete PigLatin program in Windows Forms GUI....
I need the c# code for the below assignment. Complete PigLatin program in Windows Forms GUI. Zip the solution project file and attach to this submission. Do this in the GUI format (Windows Form). Be sure and add a Clear Button to reset for entering another word or words. PigLatinGUI Basic Steps in Creating your Program Create your user interface (GUI). Use different font styles but don’t overdo it, Use colors, and Use graphics (You can find all kinds of...
create a Visual Basic project with the following features: 1. The user interface can display the...
create a Visual Basic project with the following features: 1. The user interface can display the following information, one textbox for one item: 1a. Author, in the form of Lastname, Firstname 1b. Title 1c. Source -- where the paper is published 1d. Abstract 1e. Publication year (This information is in the 1c. Source, but display the publication year separately here) 2. There is a command button "Import". It would allow the user to select the eric.txt as the input file...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT