Nested Loops In OOP

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim a, b, c As Integer

For a = 0 To 1
For b = 0 To 1
For c = 0 To 1
MsgBox("Fish")
Next
MsgBox("Dog")
Next
MsgBox("Cat")
Next

End Sub

I Started VBE in Nov/05..... My first OOP Language... I am having extreme Difficulty in Learning OOP.... Would someone please Translate these Procedural Nested Loops in the Button to Pure OOP..... Thanks



Answer this question

Nested Loops In OOP

  • mikecmr

    Billy,

    I think the recommendation to get a book and read it will be most helpful.



  • gmsalex

    Hi Billy,

    I think we've been through this before. The last time you had a locked thread.

    After seeing this thread what has occurred to me is that you have beliefs about what OOP is and I believe that has people confused.

    How about making sure that we are on the same page

    Could you describe what you to believe the characteristics of OOP to be

    Also, I don't know that OOP is a hegemonic as you suggest. There is no poltical correctness in OOP.

    I use For - Next all the time.

     

     



  • Shlizar Axis

    Thanks for the Response.... I was trying to display a bunch of Cats, Fish, and Dogs...... So if this code can't be converted to OOP I conclude it is Politically Correct to use these Procedural nested loops in an OOP program... Is this Correct I would gladly buy a book that addresses VBE OOP in particular and not a Bunch of c++ analogies and Vaquaries... Anyone know of such a Book.....

    Also

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

    If 1 = 1 Then MsgBox("1 = 1")

    End Sub

    Can any one convert the procedural code in the button to Pure OOP Thanks Again


  • Alex Bibiano

    I don't know what you want to do, but this is just a nested loop. This can't be created otherwise, this is not OOP, so nobody can convert this to pure OOP.

    Why don't you buy yourself a good book that explains OO


  • BenZilla69

    ReneeC wrote:
    Also, I don't know that OOP is a hegemonic as you suggest. There is no poltical correctness in OOP.

    I totally agree with you, there is no poltical correctness!

    ReneeC wrote:
    I use For - Next all the time.

    You evil code!



  • Ori Gershony

    Bronco Billy wrote:
    The Reason I asked these Questions is that when I look at the Generated Code I don't see any For Nexts or If Thens........ Why The Hell can't I Write Like That Thanks Again

    Wish generated code are you talking about, when you are talking about the generated code for your UI that Visual Studio renders then you are correct.

    But no loops are needed there. I really think you must read a book first, when you don't understand this basics you should learn this first before you start coding. This is no offence but a tip.



  • Hery Susanto WR

    Actually there is a lot of Politics in Language Definitions, Styles of Programming, etc...... GOTO was Taken out by Politics.....

    Politics is the process and method of making decisions for groups. Although it is generally applied to governments, politics is also observed in all human group interactions including corporate, academic, and religious.
    en.wikipedia.org/wiki/Politics


  • BReisch

    Hi Billy,

    I think we've been through this before. The last time you had a locked thread.

    Was it the Last one or two or three Locked threads before Now that you Sucker Punched me I'll Proceed....

    After seeing this thread what has occurred to me is that you have beliefs about what OOP is and I believe that has people confused.

    How can one Confuse the Confused ie If they weren't confused in the first place then I could not Confuse them any more.......

    How about making sure that we are on the same page

    I don't know... What Page are You in.....

    Could you describe what you to believe the characteristics of OOP to be

    A Godzillion Objects, classes, methods, properties etc. and 3 Funny Words all Dotted..... together to solve problems.....

    Also, I don't know that OOP is a hegemonic as you suggest. There is no poltical correctness in OOP.

    That's Good to Know.......

    I use For - Next all the time.

    You will never get a job as an Automatic Code Generater.............


  • Alex Gongora

    Again this is allready good pure oop, i think you should read a book about oop. Polimorphisme and things like that.

    A good book that covers the basic is Object Oriented Programming with VB.NET & C#.


  • Darkstorm

    Thanks for the Response.... I'll Take a Look at the Book but if it deals with the previous version of VB.Net I won't buy.... I am not that Smart and get Confused Easily....

    The Reason I asked these Questions is that when I look at the Generated Code I don't see any For Nexts or If Thens........ Why The Hell can't I Write Like That Thanks Again


  • Jason Nowicki

     

    Actually there is a lot of Politics in Language Definitions, Styles of Programming, etc...... GOTO was Taken out by Politics.....

    Politics is the process and method of making decisions for groups. Although it is generally applied to governments, politics is also observed in all human group interactions including corporate, academic, and religious.
    en.wikipedia.org/wiki/Politics


    This thread is locked because it's off topic.

  • Nested Loops In OOP