Jump to content

Tee_Kay9

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Informative
    Tee_Kay9 got a reaction from DevBlox in C++ | Can't understand Polymorphism   
    really the entire point of polymorphism is so you can send the same command to different types and have them behave differently. However in-order for that to work the two objects must share the same base class or even better a common interface (in c++ I think you need to use an abstract class but all that is besides the point)

    What you really want to know, I am guessing is WHY and in what situation would you use it in a practical manner, correct?

    Putting it very simply:
     
    A cat is an animal that can speak.
    A dog is an animal that can speak.
     
    A cat and dog are both of type animal (base class type) with a behavior of speak (method or function if you like).

    Okay so now your client application, let's call it AnimalBeater for the lack of a better idea and only only understands the concept of animal and has no idea what a dog or a cat is. Yet AnimalBeater has a method beatAmimal and when called will make the animal hollar like this:
     
    AnimalBeater.beatAmimal(animal typeA) :: typeA.speak();  << "Meow!!!"
    AnimalBeater.beatAmimal(animal typeB) :: typeB.speak(); << "Wolf!!!"

    I think the most difficult part about this is that you must understand that "typeA" and "typeB" are just parameter names, the important part is how they are declared and that being they are both as type animal. In fact, the class AnimalBeater really only has ONE GENERAL method defined   .beatAmimal(animal type) type.speak() >> cout ::: (you will get meow or wolf).
     
    There is no need to define TWO EXPLICIT methods, one for cat and one for dog. Don't do this (well not ever but you understand what i mean):

    AnimalBeater.beatAmimal(Cat cat) cat.speak()
    AnimalBeater.beatAmimal(Dog dog) dog.speak()
     
    I hope this helps.
     
     
  2. Informative
    Tee_Kay9 got a reaction from Hi P in C++ | Can't understand Polymorphism   
    really the entire point of polymorphism is so you can send the same command to different types and have them behave differently. However in-order for that to work the two objects must share the same base class or even better a common interface (in c++ I think you need to use an abstract class but all that is besides the point)

    What you really want to know, I am guessing is WHY and in what situation would you use it in a practical manner, correct?

    Putting it very simply:
     
    A cat is an animal that can speak.
    A dog is an animal that can speak.
     
    A cat and dog are both of type animal (base class type) with a behavior of speak (method or function if you like).

    Okay so now your client application, let's call it AnimalBeater for the lack of a better idea and only only understands the concept of animal and has no idea what a dog or a cat is. Yet AnimalBeater has a method beatAmimal and when called will make the animal hollar like this:
     
    AnimalBeater.beatAmimal(animal typeA) :: typeA.speak();  << "Meow!!!"
    AnimalBeater.beatAmimal(animal typeB) :: typeB.speak(); << "Wolf!!!"

    I think the most difficult part about this is that you must understand that "typeA" and "typeB" are just parameter names, the important part is how they are declared and that being they are both as type animal. In fact, the class AnimalBeater really only has ONE GENERAL method defined   .beatAmimal(animal type) type.speak() >> cout ::: (you will get meow or wolf).
     
    There is no need to define TWO EXPLICIT methods, one for cat and one for dog. Don't do this (well not ever but you understand what i mean):

    AnimalBeater.beatAmimal(Cat cat) cat.speak()
    AnimalBeater.beatAmimal(Dog dog) dog.speak()
     
    I hope this helps.
     
     
  3. Like
    Tee_Kay9 reacted to Benjeh in They put an i9 in THIS?? - AsRock DeskMini Review   
    Just why? The price would probably be significantly lower to people like me who want these chips if AsRock etc wasn;t slamming them into stupid setups....
  4. Funny
    Tee_Kay9 got a reaction from Results45 in Is Microsoft… the Good Guy? - Xbox Adaptive Controller   
    (repost from youtube and then some)
    OMFG.... is this available now? Linus I was in a car accident when I was 19 wayyy back in 1987. As a result, I lost my left arm. I know this may sound silly but one of my biggest frustrations in life is not having the dexterity to play most video games with my sons. I always wondered if it was possible to replace the left side of a controller with a foot pedal. This is the closest thing I have seen that looks like it may finally be possible to do it. I have no idea how much this thing cost but whatever it is I more than likely cannot afford it seeing that I am on a fixed income now. Just knowing that this thing exists almost made me cry. Hopefully the prices will come down soon so I can play. Thank you to you and Microsoft for the hope that someday I may be able to play with my sons. Just the thought made my day.
     
    and the some:
     
    Ookay I cannot stop thinking about this and I want to tell you more about who I am. I wrote my first computer program in 1984 on a computer created by a toy company. The Coleco Adam (Google it lol), the programming language was GW-Basic! I made a deal with my Dad that if I paid half the cost of it he would pay the other half. My first "on-line" experience came when my Dad allowed me to have one of his canceled checks and I used the routing number at the bottom to sign up for access to CompuServe (the next month billing cycle he was not happy LOL). I have been a techno geek ever since. I have been ripping apart and building PCs since the 90s but am now permanently disabled and I do not work which has made me put this expensive hobby of ours on the back burner because I just cannot afford it any longer.
     
    When I saw this on your YouTube channel Linus my jaw hit the ground. I will not reiterate what I explained in the top half of this post but I want to show you a few pictures. The first one is the remnants of my attempts to modify a PS3 controller (sorry Microsoft) to my needs. I actually did manage to get a foot pedal usually used by a musician for switching modes on a guitar to work. Trying to solder tiny wires and components together was not easy only aggravated by the fact that I was doing it with my one hand, the only one I have. But that was only half the challenge, I also had to take the controller apart and had the most difficult task of putting it back together again (which somehow I managed to do). Unfortunately it did not last long. The wire I used was not of very high quality and it got pinched between the top and bottom of the controller case and eventually broke off.
     
    The other three pictures are of what is left of my "graveyard". I recently pulled a lot of it out after not touching any of it for a few years in the hopes that I could build a Frankenstein machine from the parts so I could give it to my youngest son. (but none of worked). I tell you this last part because after becoming very depressed and disillusioned because at the age of 51 and no longer able to work, I had no idea what to do with myself. Then I just happened to stumble upon one of your videos on YouTube. I think I spent the next fourteen hours watching many others. Then I got inspired. That is when I started to build ...think scrappy wars... using what parts I had. I spent the last several weeks totally consumed with building my monster. Even though my efforts have ended failure, I cannot thank you enough for giving me the idea of even trying. Then this latest  shows up in my youtube thread and I just had to let you know my story and let ypu know that you have gained yet another loyal fan and to thank you and MS.
     
    Best Regards,
     
    Scott Tavares
     
     
     




  5. Like
    Tee_Kay9 reacted to James in Is Microsoft… the Good Guy? - Xbox Adaptive Controller   
    Buy Xbox Adaptive Controller on Amazon: https://geni.us/aHrx
     
    The Xbox Adaptive Controller is an accessibility-focused interface that lets people of all ability levels enjoy gaming on the Xbox One.
     
     
×