Added: 2 years ago
From: lacerf
Views: 4,379
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (10)

Sign In or Sign Up now to post a comment!
  • Did you really have to make an example of balls lol

  • ..... ur name's Fabio? lmao!

  • the best way to think of it is that you're accessing a super class by creating an object

  • Thanks for your video its really informative..

    can you by change help me in my java course work pls?

  • Very nice video. At first I was impatient listening to you but then as I Iisten on, everything starts to make sense.  Great technique.

  • I think the ball example is a pretty good introduction into Java (and object oriented design in general), since it actaully forces some understanding of what you're doing into the exercise. I have one thing that'd I'd like to point out that don't particularly affect this example too much, but could lead to difficult to manage code in larger projects. Assuming one had a definition for isFlat (e.g., pressure is less than 1), it should be derived. (continued)

  • In this case, the value of isFlat is dependent on airPressure. The airPressure field is private, so we can only change it's value through inflate() and deflate(). However, if you updated only airPressure and not isFlat (or vice versa), you could end up with a ball that is flat but has air pressure, leading to a violation of consistency. Since calculating the value of this attribute is relatively uninvolved. While caching has its place, it's probably better to have an isFlat() method instead.

  • Thanks very much for taking the time to make this tutorial. Having practical examples makes a world of difference!

    The audio compression is a tad annoying, but the tutorial itself is quite helpful!

  • Thanks dude! really helped me out! (:

  • Thanks for this ( 4 ) parts ,

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more