Welcome to Dream.In.Code
Become a VB Expert!

Join 149,556 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,610 people online right now. Registration is fast and FREE... Join Now!




Making Object-Oriented

 
Reply to this topicStart new topic

Making Object-Oriented

libby50
18 Nov, 2007 - 06:14 PM
Post #1

New D.I.C Head
*

Joined: 8 Nov, 2007
Posts: 15


My Contributions
I am trying to make this object oriented, but can't figure how to connect everything together.


CODE
Private Sub CalcButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalcButton.Click
        Dim Rate As Double
        Dim Nper As Double
        Dim PV As Double
        Dim FV As Double
        Dim Due As DueDate
        Dim returnValue As Double
        

        ' Setting the values to each of our variables.    
        Rate = 0.06
        Nper = 4
        PV = 12000
        FV = 0.0
        Due = DueDate.EndOfPeriod


        returnValue = -Financial.Pmt(Rate, Nper, PV, FV, Due)

        PaymentsLabel.Text = returnValue



    End Sub

End Class


***This is my class called Loan***
Public Class Loan
    'attributes section
    Private _loan As Decimal
    Private _interest As Decimal
    Private _term As Decimal

End Class


MOD EDIT: Use code tags like this code.gif
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/7/09 09:58PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month