1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Help needed on Visual basics 2005

Discussion in 'Programming & Webmastering' started by attoe123, Nov 25, 2008.

  1. attoe123 New Member

    Joined:
    Nov 25, 2008
    Messages:
    6 (0.00/day)
    Thanks Received:
    0
    hi all

    ive been set an assignment at uni to create the following application

    Create an application to simulate a small “repayments calculator” .
    The application should allow the customer to enter the following details:

    • price of the car
    • down-payment
    • current annual interest rate offered



    The application should then display the following in a tabular form:

    • loans duration in months
    • monthly repayments for 2, 3, 4, and 5 year loans
    • total cost of loans

    The variety of options should allow the user to easily compare repayment plans and choose the one that most suits their requirements.

    The application must perform input data validation to check that the specified
    down-payment is a minimum of 10%.


    ive created the GUI but have no idea how to create the code for such a program can someone hlep me please :)

    nathan
     
  2. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    19,567 (6.34/day)
    Thanks Received:
    8,819
    Location:
    IA, USA
    Could you be more specific on what you need help with?
     
    Crunching for Team TPU
  3. Steevo

    Steevo

    Joined:
    Nov 4, 2005
    Messages:
    9,599 (2.31/day)
    Thanks Received:
    2,089


    How about we provide the code if you give us your teachers e-mail? ;)
     
    10 Year Member at TPU 10 Million points folded for TPU
  4. sno.lcn

    sno.lcn

    Joined:
    Dec 29, 2006
    Messages:
    693 (0.19/day)
    Thanks Received:
    167
    Location:
    Atlanta, GA, USA
    What do you not know how to do? Do you need the code for all of it?


    *Edit: How does your teacher feel about getting help? And how much are you allowed to get?
     
    Last edited: Nov 25, 2008
    10 Year Member at TPU
  5. Sasqui

    Sasqui

    Joined:
    Dec 6, 2005
    Messages:
    9,100 (2.20/day)
    Thanks Received:
    3,107
    Location:
    Manchester, NH
    "Give a man code, and he can pass a class. Teach a man..." oh, nevermind,

    :laugh:
     
    DanTheBanjoman says thanks.
    10 Year Member at TPU Crunching for Team TPU
  6. sno.lcn

    sno.lcn

    Joined:
    Dec 29, 2006
    Messages:
    693 (0.19/day)
    Thanks Received:
    167
    Location:
    Atlanta, GA, USA
    Not when exam time comes ;)
     
    10 Year Member at TPU
  7. attoe123 New Member

    Joined:
    Nov 25, 2008
    Messages:
    6 (0.00/day)
    Thanks Received:
    0
    hey all

    being more specific

    ive got to create a car loans calculator attached is the GUI which i have created as you will see it only a basic calulator the thing that i am stuck on is the code,

    im not sure how i can get the program to calculate the loan amount minus the down payment and work out the intrest rate. and then display the information in the text box at the bottom in the follwoing format

    loan duration (YEARS) Monthly repayments total cost (inc.intrest)
    2
    3
    4
    5

    the loan amount, intrest rate and down payment the user types in

    im not looking for the code to be written for me im looking for guidence and help with me writting the code myself

    ive not being doing programming for long and ive not very confident at to behonest a little confused about making the code i willing to learn i just need help :)
     

    Attached Files:

  8. Steevo

    Steevo

    Joined:
    Nov 4, 2005
    Messages:
    9,599 (2.31/day)
    Thanks Received:
    2,089
    Create somethign in excel and use VB in there.
     
    10 Year Member at TPU 10 Million points folded for TPU
  9. attoe123 New Member

    Joined:
    Nov 25, 2008
    Messages:
    6 (0.00/day)
    Thanks Received:
    0
    i have to use vb software to create all theprogram
     
  10. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    19,567 (6.34/day)
    Thanks Received:
    8,819
    Location:
    IA, USA
    I expect you have some understanding of algebra, correct? You know, 1 + 2 = x therefore x = 3...

    I also expect you to know how to turn that equation into a VB statement:
    Code:
    Dim x As Integer = 1 + 2
    And because you'll be dealing with decimal numbers instead, we revise it like so:
    Code:
    Dim x As Double = 1.0 + 2.0
    You can retrieve text from a TextBox and convert it to a decimal like so...
    Code:
    Dim x As Double = Conver.ToDouble(myTextBox.Text)
    Now that we have know we have the fundamentals down...

    Just expand upon it.
     
    Crunching for Team TPU
  11. attoe123 New Member

    Joined:
    Nov 25, 2008
    Messages:
    6 (0.00/day)
    Thanks Received:
    0
    how do i get the answerto display in the text box
    ive been told all the code will go in the calulate button is that correct?
     
  12. DanTheBanjoman Señor Moderator

    Joined:
    May 20, 2004
    Messages:
    10,480 (2.23/day)
    Thanks Received:
    1,384
    myTextBox.text = 1 + 2

    it would fill the textbox with 3. Don't they teach you the basics in class?
     
    10 Year Member at TPU
  13. attoe123 New Member

    Joined:
    Nov 25, 2008
    Messages:
    6 (0.00/day)
    Thanks Received:
    0
    im really confused ive not beeen learning for long
     
  14. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    19,567 (6.34/day)
    Thanks Received:
    8,819
    Location:
    IA, USA
    Or if it is already in a variable...
    Code:
    Dim x As Double = 1.0 + 2.0
    myTextBox.Text = x.ToString()
     
    Crunching for Team TPU
  15. DanTheBanjoman Señor Moderator

    Joined:
    May 20, 2004
    Messages:
    10,480 (2.23/day)
    Thanks Received:
    1,384
    Why the tostring()? It works fine without. Are there any examples in which it would go wrong otherwise? ie am I writing dirty code?:)
     
    10 Year Member at TPU
  16. attoe123 New Member

    Joined:
    Nov 25, 2008
    Messages:
    6 (0.00/day)
    Thanks Received:
    0
    its staying my text box cant be defined as double y
     
  17. FordGT90Concept

    FordGT90Concept "I go fast!1!11!1!"

    Joined:
    Oct 13, 2008
    Messages:
    19,567 (6.34/day)
    Thanks Received:
    8,819
    Location:
    IA, USA
    "string = object" defaults to "string = object.ToString()"

    Basically not to have it is to be lazy. :p

    I include it because it forces the type of string to be used. It's not vital in this scenario because Control.Text is explicitly declared a string but it would be, for instance, in assigning data to the Control.Tag property which is explicitly defined as an object. Instead of Control.Tag being of type string, as intended, it would be of type double. So at some point, it would still have to invoke the object.ToString() method.


    Could you copy the line that is throwing that exception and any relevant information?
     
    Crunching for Team TPU

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)