Results 1 to 2 of 2

Thread: Sub procedure and a Function procedure

  1. #1

    Thread Starter
    Member
    Join Date
    Apr 2010
    Posts
    34

    Sub procedure and a Function procedure

    I have to get a value in $.

    I have 2 radio buttons:
    Residential Customers
    Business Customers

    I have 2 List boxes:
    Premium Channels
    Connections

    I also have a total Text Box and a calculate button



    My goal is to get a cost given the information from the user. the list boxes will have preassigned numbers in them


    Variables:
    The residential Customers have to pay a $4.50 Processing fee, a Basic service fee of $30 and 5$ for ever Premium Chanel they buy.

    The Business Customers have to pay a processing fee of $16.50, a basic service fee of $80 for the first 10 connections (4$ for any connection after that) and 50$ per Premium Chanel (no limit)


    Can Anyone HELP?! I am totally stuck!!

    The project calls for a Sub and function procedure.

  2. #2

    Thread Starter
    Member
    Join Date
    Apr 2010
    Posts
    34

    Re: Sub procedure and a Function procedure

    What I am working on:

    Assign objects to List Boxes in the MainForm

    premiumListBox.Items.Add("1")
    premiumListBox.Items.Add("2")
    premiumListBox.Items.Add("3")
    premiumListBox.Items.Add("4")
    premiumListBox.Items.Add("5")
    premiumListBox.Items.Add("6")
    premiumListBox.Items.Add("7")

    connectionsListBox.Items.Add("1")
    connectionsListBox.Items.Add("2")
    connectionsListBox.Items.Add("3")
    connectionsListBox.Items.Add("4")
    connectionsListBox.Items.Add("5")
    connectionsListBox.Items.Add("6")

    Then Assign Variables

    Dim premium As Double

    Dim connections As Decimal
    Dim total As Integer
    Dim businessradiobutton As Decimal
    Dim residentialradiobutton As Decimal


    Integer.TryParse(totalTextBox.Text, total)
    Double.TryParse(premiumListBox.SelectedItem.ToString, premium)
    Double.TryParse(connectionsListBox.SelectedItem.ToString, connections)

    The Radio Buttons will have a value.

    Residential is $4.5 for processing fee and $30 for Basic Service
    so..... residentialradiobutton = $34.5

    as businessradiobutton = $80 for 10 connections and the $4 for each additional connection
    so...... businessradiobutton =
    if businessradiobutton >= 10 then
    businessradiobutton = 80 else
    businessradiobutton = ?????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width