hi,i'm workin on a console application that uses the hierarchical inheritance for banking operation i.e account creation,deposit,withdraw and balance.
i've written the following code but don't know what's wrong with it.. it says "'dep' is not a member of 'ConsoleApplication1.Module1.withdraw'".
this is the code!
"
Public Class creation
Dim name As String
Dim address As String
Dim phone As Integer
Public amt As Integer
Public wd As Integer
Public bal As Integer
Sub display()
name = Console.ReadLine()
address = Console.ReadLine()
phone = Console.ReadLine()
End Sub
Sub print()
Console.WriteLine(name)
Console.WriteLine(address)
Console.WriteLine(phone)
End Sub
End Class
Public Class deposit
Inherits creation
Sub dep()
Console.WriteLine("enter the amt to be deposited:")
amt = Console.ReadLine()
Console.WriteLine("the amt deposited is ", amt)
End Sub
End Class
Public Class withdraw
Inherits creation
Sub withd()
Console.WriteLine("enter the amt to withdraw fro ur account")
wd = Console.ReadLine()
bal = amt - wd
Console.WriteLine("the bal is ", bal)
End Sub
End Class
Sub Main()
Dim ob As New withdraw
ob.display()
ob.print()
ob.dep()
ob.withd()
End Sub