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

Help needed on Visual basics 2005

attoe123

New Member
Joined
Nov 25, 2008
Messages
6 (0.00/day)
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
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
Could you be more specific on what you need help with?
 
Joined
Nov 4, 2005
Messages
11,687 (1.73/day)
System Name Compy 386
Processor 7800X3D
Motherboard Asus
Cooling Air for now.....
Memory 64 GB DDR5 6400Mhz
Video Card(s) 7900XTX 310 Merc
Storage Samsung 990 2TB, 2 SP 2TB SSDs and over 10TB spinning
Display(s) 56" Samsung 4K HDR
Audio Device(s) ATI HDMI
Mouse Logitech MX518
Keyboard Razer
Software A lot.
Benchmark Scores Its fast. Enough.
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



How about we provide the code if you give us your teachers e-mail? ;)
 
Joined
Dec 29, 2006
Messages
693 (0.11/day)
Location
Atlanta, GA, USA
Processor Intel 6700K
Motherboard Asus Maximus VIII Impact
Cooling Noctua NH-L9x65
Memory 2 x 16 GB G.Skill TridentZ @ 3200 MHz
Video Card(s) Gigabyte GTX 1070 Mini
Case Thermaltake Suppressor F1
Power Supply SilverStone 600w SFX
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:
Joined
Dec 6, 2005
Messages
10,881 (1.62/day)
Location
Manchester, NH
System Name Senile
Processor I7-4790K@4.8 GHz 24/7
Motherboard MSI Z97-G45 Gaming
Cooling Be Quiet Pure Rock Air
Memory 16GB 4x4 G.Skill CAS9 2133 Sniper
Video Card(s) GIGABYTE Vega 64
Storage Samsung EVO 500GB / 8 Different WDs / QNAP TS-253 8GB NAS with 2x10Tb WD Blue
Display(s) 34" LG 34CB88-P 21:9 Curved UltraWide QHD (3440*1440) *FREE_SYNC*
Case Rosewill
Audio Device(s) Onboard + HD HDMI
Power Supply Corsair HX750
Mouse Logitech G5
Keyboard Corsair Strafe RGB & G610 Orion Red
Software Win 10
"Give a man code, and he can pass a class. Teach a man..." oh, nevermind,

:laugh:
 
Joined
Dec 29, 2006
Messages
693 (0.11/day)
Location
Atlanta, GA, USA
Processor Intel 6700K
Motherboard Asus Maximus VIII Impact
Cooling Noctua NH-L9x65
Memory 2 x 16 GB G.Skill TridentZ @ 3200 MHz
Video Card(s) Gigabyte GTX 1070 Mini
Case Thermaltake Suppressor F1
Power Supply SilverStone 600w SFX
Not when exam time comes ;)
 

attoe123

New Member
Joined
Nov 25, 2008
Messages
6 (0.00/day)
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 :)
 

Attachments

  • Loan Repayment Calculator.zip
    54.3 KB · Views: 304
Joined
Nov 4, 2005
Messages
11,687 (1.73/day)
System Name Compy 386
Processor 7800X3D
Motherboard Asus
Cooling Air for now.....
Memory 64 GB DDR5 6400Mhz
Video Card(s) 7900XTX 310 Merc
Storage Samsung 990 2TB, 2 SP 2TB SSDs and over 10TB spinning
Display(s) 56" Samsung 4K HDR
Audio Device(s) ATI HDMI
Mouse Logitech MX518
Keyboard Razer
Software A lot.
Benchmark Scores Its fast. Enough.
Create somethign in excel and use VB in there.
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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.
 

attoe123

New Member
Joined
Nov 25, 2008
Messages
6 (0.00/day)
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.

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?
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
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?
Or if it is already in a variable...
Code:
Dim x As Double = 1.0 + 2.0
myTextBox.Text = x.ToString()
 

FordGT90Concept

"I go fast!1!11!1!"
Joined
Oct 13, 2008
Messages
26,259 (4.63/day)
Location
IA, USA
System Name BY-2021
Processor AMD Ryzen 7 5800X (65w eco profile)
Motherboard MSI B550 Gaming Plus
Cooling Scythe Mugen (rev 5)
Memory 2 x Kingston HyperX DDR4-3200 32 GiB
Video Card(s) AMD Radeon RX 7900 XT
Storage Samsung 980 Pro, Seagate Exos X20 TB 7200 RPM
Display(s) Nixeus NX-EDG274K (3840x2160@144 DP) + Samsung SyncMaster 906BW (1440x900@60 HDMI-DVI)
Case Coolermaster HAF 932 w/ USB 3.0 5.25" bay + USB 3.2 (A+C) 3.5" bay
Audio Device(s) Realtek ALC1150, Micca OriGen+
Power Supply Enermax Platimax 850w
Mouse Nixeus REVEL-X
Keyboard Tesoro Excalibur
Software Windows 10 Home 64-bit
Benchmark Scores Faster than the tortoise; slower than the hare.
Why the tostring()? It works fine without. Are there any examples in which it would go wrong otherwise? ie am I writing dirty code?:)
"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.


its staying my text box cant be defined as double y
Could you copy the line that is throwing that exception and any relevant information?
 
Top