dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online MembersLaxmikant
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




Forums » .NET » .NET »

Vb.Net program stucked. i need a help to solve errors


Posted Date: 08 Sep 2012      Posted By:: Angel     Member Level: Bronze    Member Rank: 3215     Points: 5   Responses: 2



This is the programming code where i'm stucked.

Imports System.Console
Module m14
Public MustInherit Class One
Public MustOverride Function area() As Double
End Class
Public Class Two Inherits One
Dim l, b, h, r as Integer
Dim pi as Double = 3.14
Dim area as
Writeline(" * Enter the value of l :")
l=Readline()
Writeline(" * Enter the value of b :")
b=Readline()
Writeline(" * Enter the value of h :")
h=Readline()
Writeline(" * Enter the value of r :")
r=Readline()
Public Overrides function area() as Double
return (l * b)
End Function
End Class
Public Class Three Inherits One
Dim l, b, h, r as Integer
Dim pi as Double = 3.14
Dim area as
Writeline(" * Enter the value of l :")
l=Readline()
Writeline(" * Enter the value of b :")
b=Readline()
Writeline(" * Enter the value of h :")
h=Readline()
Writeline(" * Enter the value of r :")
r=Readline()
Public Overrides function area() as Double
return (b * h/2)
End Function
End Class
Public Class Four Inherits One
Dim l, b, h, r as Integer
Dim pi as Double = 3.14
Dim area as
Writeline(" * Enter the value of l :")
l=Readline()
Writeline(" * Enter the value of b :")
b=Readline()
Writeline(" * Enter the value of h :")
h=Readline()
Writeline(" * Enter the value of r :")
r=Readline()
Public Overrides function area() as Double
return (pi * r * r)
End Function
End class
Public Class Five Inherits One
Dim l, b, h, r as Integer
Dim pi as Double = 3.14
Dim area as
Writeline(" * Enter the value of l :")
l=Readline()
Writeline(" * Enter the value of b :")
b=Readline()
Writeline(" * Enter the value of h :")
h=Readline()
Writeline(" * Enter the value of r :")
r=Readline()
Public Overrides function area() as Double
return (2*(pi * r * r) + (2 * pi * r * h))
End Function
End Class
Public Class Six Inherits One
Dim l, b, h, r as Integer
Dim pi as Double = 3.14
Dim area as
Writeline(" * Enter the value of l :")
l=Readline()
Writeline(" * Enter the value of b :")
b=Readline()
Writeline(" * Enter the value of h :")
h=Readline()
Writeline(" * Enter the value of r :")
r=Readline()
Public Shadows function area() as Double
return (4 * pi * r * r)
End Function
End class
Sub main()
Dim tw as New Two()
Dim thr as New Three()
Dim fr as New Four()
Dim fv as New Five()
Dim sx as New Six()
Writeline(" * Area of Rectrangle is : {0}",tw.area())
Writeline(" * Area of Triangle is : {0}",thr.area())
Writeline(" * Area of Circle is : {0}",fr.area())
Writeline(" * Area of Cylinder is : {0}",fv.area())
Writeline(" * Area of Sphere is : {0}",sx.area())
ReadKey()
End Sub
End Module


Someone please help me if you know.




Responses

#688011    Author: Gopi A      Member Level: Silver      Member Rank: 349     Date: 08/Sep/2012   Rating: 2 out of 52 out of 5     Points: 1

Hi,

Could you share the error what you were received.

-----------------------------------------------------------------------------
Regards,
Gopi A.
+91 9894315571
Skype:gopi.net



 
#688025    Author: Angel      Member Level: Bronze      Member Rank: 3215     Date: 08/Sep/2012   Rating: 2 out of 52 out of 5     Points: 1

For all variables l, b, h, r : Declaration expected : error BC30188
Ans for all methods : function area cannot be declared as 'overrides' because it does not override a function in base class : error BC30205

Please help me out.



 
Post Reply
You must Sign In to post a response.

Next : VB.Net Programmin code
Previous : Prevent the ascending order in datagridview
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.