Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hello,

I have finally got to the point of not having any errors - at least the ones that I can see.

 

I cannot get the output I need though and I don't know why

 

here is the code

Module Inventory
   Sub Main()

       Dim warranty As String
       Dim CarPrice As Single
       Dim myNewCar As New Car(3456, "usedCar", "Chevy", "S-10", "1999", 98429652)
       CarPrice = myNewCar.price()
       Debug.WriteLine(CarPrice)
       warranty = myNewCar.carWarranty()
       Debug.WriteLine(warranty)
   End Sub 


Public Sub New(ByVal originalCost As Single, ByVal category As String, ByVal make As String, ByVal model As String, _
   ByVal year As String, ByVal vin As Long)
       dealerPrice = originalCost
       Me.category = category
       Me.make = make
       Me.model = model
       Me.year = year
       Me.vin = vin

 Public Function price() As Single

       If category = ("usedCar") Then
           stickerPrice = dealerPrice * usedGouge
       ElseIf category = ("basicCar") Then
           stickerPrice = dealerPrice * basicGouge
       Else
           stickerPrice = dealerPrice * luxuryGouge
       End If
       Return stickerPrice

   End Function

 

I believe that is all the code necessary here to show yuo all if not let me know9 the warranty is fine for the output - I get the price in the output but not the rest like model-Honda

 

Thanks

Rob

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...