Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Physics in OOP?

Physics in OOP?

Scheduled Pinned Locked Moved The Lounge
questiongame-dev
38 Posts 25 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Monin D

    Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

    L Offline
    L Offline
    Lost User
    wrote on last edited by
    #3

    You're over complicating things. Keep it simple, forget about class hierarchies:

    public void BigBang()
    {
    // insert some pretty dynamic algorithms here
    }

    P M E 3 Replies Last reply
    0
    • L Lost User

      You're over complicating things. Keep it simple, forget about class hierarchies:

      public void BigBang()
      {
      // insert some pretty dynamic algorithms here
      }

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #4

      You forgot to factor in entropy:

      public class Universe : IDisposable
      {
      private Universe() {}
      public static Universe BigBang()
      {
      return new Universe();
      }
      public void Dispose()
      {
      // Tidy up and suppress the finalizer.
      }
      }

      Deja View - the feeling that you've seen this post before.

      My blog | My articles

      1 Reply Last reply
      0
      • M Monin D

        Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

        S Offline
        S Offline
        Single Step Debugger
        wrote on last edited by
        #5

        Thats me:

        #define ETERNITY 99999999999

        static long haveSex = 0;

        class DeyanGeorgiev : public Man, public virtual Mammal
        {
        public:

        virtual void WantSex()
        {
        	While(!(true == HaveSex()))
        	{
        		Man::WantSex();
        	}
        } 
        
        private:
        
        virtual bool  HaveSex()
        {
        	Man:: HaveSex()
        	
        	return  ++haveSex > ETERNITY;
        }
        

        }

        The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word.

        A T 2 Replies Last reply
        0
        • M Monin D

          Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

          S Offline
          S Offline
          snorkie
          wrote on last edited by
          #6

          Wait, what type of application is it, Windows/Linux/Mac/Web??? I guess web, but I don't want to look at a web.config for that! And what browser version are you coding for? Hogan

          P 1 Reply Last reply
          0
          • S snorkie

            Wait, what type of application is it, Windows/Linux/Mac/Web??? I guess web, but I don't want to look at a web.config for that! And what browser version are you coding for? Hogan

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #7

            snorkie wrote:

            what browser version are you coding for?

            I don't want to think I'm running inside Netscape.

            Deja View - the feeling that you've seen this post before.

            My blog | My articles

            C B 2 Replies Last reply
            0
            • M Monin D

              Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

              B Offline
              B Offline
              BonshatS
              wrote on last edited by
              #8

              Math might be a language some try to disassemble the Reality API into.

              A 1 Reply Last reply
              0
              • P Pete OHanlon

                snorkie wrote:

                what browser version are you coding for?

                I don't want to think I'm running inside Netscape.

                Deja View - the feeling that you've seen this post before.

                My blog | My articles

                C Offline
                C Offline
                Chris Meech
                wrote on last edited by
                #9

                Imagine hearing the fat lady sing when running in Opera. :cool:

                Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]

                1 Reply Last reply
                0
                • L Lost User

                  You're over complicating things. Keep it simple, forget about class hierarchies:

                  public void BigBang()
                  {
                  // insert some pretty dynamic algorithms here
                  }

                  M Offline
                  M Offline
                  Mladen Jankovic
                  wrote on last edited by
                  #10

                  void BigBang() { *(int*)NULL = 0; }

                  Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)

                  1 Reply Last reply
                  0
                  • M Monin D

                    Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                    M Offline
                    M Offline
                    Mladen Jankovic
                    wrote on last edited by
                    #11

                    Monin D. wrote:

                    But what is then Physics and Mathematics?

                    Abstract factories maybe.

                    Mostly, when you see programmers, they aren't doing anything. One of the attractive things about programmers is that you cannot tell whether or not they are working simply by looking at them. Very often they're sitting there seemingly drinking coffee and gossiping, or just staring into space. What the programmer is trying to do is get a handle on all the individual and unrelated ideas that are scampering around in his head. (Charles M Strauss)

                    1 Reply Last reply
                    0
                    • M Monin D

                      Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                      M Offline
                      M Offline
                      Marc Clifton
                      wrote on last edited by
                      #12

                      I suspect God is an Observer Pattern. Marc

                      Thyme In The Country Interacx My Blog

                      L 1 Reply Last reply
                      0
                      • M Marc Clifton

                        I suspect God is an Observer Pattern. Marc

                        Thyme In The Country Interacx My Blog

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #13

                        Nah - God is an abstract class.

                        Take a chill pill, Daddy-o .\\axxx (That's an 'M')

                        M 1 Reply Last reply
                        0
                        • S Single Step Debugger

                          Thats me:

                          #define ETERNITY 99999999999

                          static long haveSex = 0;

                          class DeyanGeorgiev : public Man, public virtual Mammal
                          {
                          public:

                          virtual void WantSex()
                          {
                          	While(!(true == HaveSex()))
                          	{
                          		Man::WantSex();
                          	}
                          } 
                          
                          private:
                          
                          virtual bool  HaveSex()
                          {
                          	Man:: HaveSex()
                          	
                          	return  ++haveSex > ETERNITY;
                          }
                          

                          }

                          The narrow specialist in the broad sense of the word is a complete idiot in the narrow sense of the word.

                          A Offline
                          A Offline
                          Anton Afanasyev
                          wrote on last edited by
                          #14

                          I would assume that would have been in the Man class...

                          "impossible" is just an opinion.

                          B 1 Reply Last reply
                          0
                          • B BonshatS

                            Math might be a language some try to disassemble the Reality API into.

                            A Offline
                            A Offline
                            Anton Afanasyev
                            wrote on last edited by
                            #15

                            Heh. Nicely said ;)

                            "impossible" is just an opinion.

                            1 Reply Last reply
                            0
                            • M Monin D

                              Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                              S Offline
                              S Offline
                              Shog9 0
                              wrote on last edited by
                              #16

                              Monin D. wrote:

                              But what is then Physics and Mathematics?

                              They're the crucial functional libraries that the OOP folks want to wrap and would really just as soon pretend didn't exist at all, but which were in heavy use long before the taxonomists showed up and decided that a sufficiently complicated naming scheme would make them into gods... :rolleyes:

                              Citizen 20.1.01

                              'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'

                              1 Reply Last reply
                              0
                              • L Lost User

                                You're over complicating things. Keep it simple, forget about class hierarchies:

                                public void BigBang()
                                {
                                // insert some pretty dynamic algorithms here
                                }

                                E Offline
                                E Offline
                                El Corazon
                                wrote on last edited by
                                #17

                                Greeeg wrote:

                                public void BigBang() { // insert some pretty dynamic algorithms here }

                                particles.add(really_big_number); while (forever) particles.update();

                                1 Reply Last reply
                                0
                                • M Monin D

                                  Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                                  E Offline
                                  E Offline
                                  El Corazon
                                  wrote on last edited by
                                  #18

                                  viruses are animals, having most of the same properties of humans... haven't you watched the matrix?

                                  1 Reply Last reply
                                  0
                                  • M Monin D

                                    Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                                    J Offline
                                    J Offline
                                    Judah Gabriel Himango
                                    wrote on last edited by
                                    #19

                                    Physics is the logic governing the objects in the universe. Business logic, if you will. ;) Mathematics is just the Human objects' study of the quantity, structure, space, and change[^] of objects in the universe.

                                    1 Reply Last reply
                                    0
                                    • M Monin D

                                      Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                                      A Offline
                                      A Offline
                                      Ameen AboDabash
                                      wrote on last edited by
                                      #20

                                      Have a good mood, hmmm, Physics is the core assemblies which provide many APIs which has been wrote by Math# as Lang. in addtion our physicsnral.dll store all updates and exapand its AI abilities ... where the quarks, protons, atoms, molcules ...etc are acting like a communcation Tokens and used diffrently according to communcation protocols. for couple of years we had a partially infected by Tsunami32 Virus welcome to GlobalX platform x64. Regards- Ameen Abudbush Sr. Programmer

                                      1 Reply Last reply
                                      0
                                      • L Lost User

                                        Nah - God is an abstract class.

                                        Take a chill pill, Daddy-o .\\axxx (That's an 'M')

                                        M Offline
                                        M Offline
                                        Mike Marynowski
                                        wrote on last edited by
                                        #21

                                        God is derived from the Idea class, and happens to be referenced from the Brain.Ideas array in 86% of Human class instances (as of the last report I ran on my Earth database in 2005)

                                        1 Reply Last reply
                                        0
                                        • M Monin D

                                          Let's look to the world as to a big Application. I am an instance of type Man, I extend class Human, and Human somehow extends abstract class Mammal...which was well tested before on other classes like Monkey, Tiger, Lion and many others...and Mammal derives from type Object (p.s. biological model is simplified :) ) But what is then Physics and Mathematics? Is it an Operating System? But where are every day updates? Where are viruses? And what are molecules and atoms? Is it what you see in ildasm.exe?

                                          K Offline
                                          K Offline
                                          kirwani
                                          wrote on last edited by
                                          #22

                                          Surely molecules and atoms are below the OOP language level. Are they not the machine language; where molecules are complete instructions including operands. If you are seriously trying to understand such objects in terms of their class relationship to say living things then they are interacting constituents. For instance nothing is actually derived from an atom. A molecule isn't an extended class of atom, it does however contain atoms.

                                          Happy Hacking Ian

                                          B T 2 Replies Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups