hi
i'm new member can someone help me with this code is for create a class car
is creating a class car that has 3 private properties
make , model , elapsedmileage as string
the car class is making only from "old" or "chevrolet"
also there is a function drive that returms a msg just after calculating the elapsedmileage which is equal to the current elapsedmileage + miles
the msg format" make & " " & model & "has" & elapsedmileage &" miles"
also there is another class the name of it class utility which has only one function that cal gas price and it is = to miles * 0.40
in the class form
only one button and one txtbox for the miles
in the button we have to declare and create a car obj
the properties
make= "old"
model= " ???"
elapsedmileage =10000
make= "BMW"
then a msg popup of property make
i already did some of the class car coding and i couldn't complete coz i didn't know how
this is what i wrote of the code
Dim m_make As String
Dim m_model As String
Dim m_elapsedMileag e As String
Public Sub New(ByVal Model As String, _
ByVal Make As String, _
ByVal elapsedMileage As String)
m_make = Make
m_model = Model
m_elapsedMileag e = elapsedMileage
End Sub
Public Property Make() As String
Get
Return m_Make
End Get
Set(ByVal value As String)
m_Make = Value
End Set
End Property
Public Property Model() As String
Get
Return m_Model
End Get
Set(ByVal value As String)
m_Model = Value
End Set
End Property
can someone help me with the rest of the coding,plz (i'm using vb.net 2005)
i'm new member can someone help me with this code is for create a class car
is creating a class car that has 3 private properties
make , model , elapsedmileage as string
the car class is making only from "old" or "chevrolet"
also there is a function drive that returms a msg just after calculating the elapsedmileage which is equal to the current elapsedmileage + miles
the msg format" make & " " & model & "has" & elapsedmileage &" miles"
also there is another class the name of it class utility which has only one function that cal gas price and it is = to miles * 0.40
in the class form
only one button and one txtbox for the miles
in the button we have to declare and create a car obj
the properties
make= "old"
model= " ???"
elapsedmileage =10000
make= "BMW"
then a msg popup of property make
i already did some of the class car coding and i couldn't complete coz i didn't know how
this is what i wrote of the code
Dim m_make As String
Dim m_model As String
Dim m_elapsedMileag e As String
Public Sub New(ByVal Model As String, _
ByVal Make As String, _
ByVal elapsedMileage As String)
m_make = Make
m_model = Model
m_elapsedMileag e = elapsedMileage
End Sub
Public Property Make() As String
Get
Return m_Make
End Get
Set(ByVal value As String)
m_Make = Value
End Set
End Property
Public Property Model() As String
Get
Return m_Model
End Get
Set(ByVal value As String)
m_Model = Value
End Set
End Property
can someone help me with the rest of the coding,plz (i'm using vb.net 2005)
Comment