Object Oriented Design 2

[ad_1]
Get Diagrams and Code Here :

In the previous part of my Object Oriented Design Tutorial, I showed you how to build a Use Case, Object Model, Sequence Diagram and Class Diagram from scratch.

In this tutorial, I show you how to turn those diagrams into code and a working program. This is the process a person goes through to create excellent Object Oriented Designs. The code is linked to above.

You should get the code and UML Diagrams to completely understand this topic! [They Are Free]


Posted

in

by

Tags:

Comments

45 responses to “Object Oriented Design 2”

  1. xpilarz0 Avatar

    Hey guys!
    This is my C# implementation of this example:
    https://github.com/mehlian/OOD-Examples/tree/4f44e0fb739a04eee48e932f3b15449bfd36e5b9

    What do you think?
    Update:
    Here is new version with architecture design of the system:
    https://github.com/mehlian/OOD-Examples/tree/d520a63672a98f2e8a9135d7cff6eca04597736f

    I wanted to get rid of UI calls from Game's Lib.
    Not really like this new design.

  2. Rhett Melton Avatar

    It's 2017 and you're still teaching with this video! I'm a Comp Sci major who's been out of school for a few years (I've been working in telecommunications engineering and project management) and I just needed some fast-paced refreshers to get me back in the groove. This is absolutely perfect for that. Thank you!!

  3. Sina M Avatar

    IT GETS BETTER BY THE EPISODE!

  4. Manyata Goyal Avatar

    There is a bug here which will cause the same result to appear for every game. Coin is being assigned a random value in the constructor which is never changing.

  5. Lucas Hernández Avatar

    Thank you! I'm right now watching these series.

  6. Britka Sablja Avatar

    Great series. There are a lot programming tutorials out there but not so much software design tutorials.

  7. zoro onepiece Avatar

    awesome video man thanks alot but i have a question how do i attach that code to something visual like a coin that i can see flipping on the screen or something then see a result pop up? 😀

  8. Li Jie Avatar

    Thank you very much 🙂

  9. Han Solo Avatar

    I followed along, but I made a 3rd person called the mediator. The mediator owns the coin, and you just give him a couple of players and say play a round. The mediator decides who's player one and player two, asks a random one to guess, flips the coin, then announces the winner.

  10. mggl lvrdo Avatar

    Done. Coinflippinggame
    thanks again.

  11. Krishna Kumar Avatar

    Thank u you very much. Till now nobody explains OOP's very clearly. I watched all your video's and subscribed. It was really very very good. As you intended if I will also get chance I will also do some thing for poor people…

  12. Joe Benge Avatar

    15:34

    Do you know how much it bothered me the entire video watching you not fix the indexes and string names of players in the CoinGame construct? Lol. Such a distraction. Great video though!

  13. crudhost Avatar

    Hi again :P. I think that the relationships between Player, Coin and CoinGame is composition. In this case, it involves property. If you destroy an instance of Coin Game, Player and Coin instances , should disappear.

    Nice videos..I'm freshening old knowledge hehehe.

  14. susantha warnapura Avatar

    in object oriented analysis used these diagrams – use case diagram,sequence diagram
    are above diagrams are the only ones that used in analysis?

    in object oriented design used these diagrams – class diagram , sequential diagram
    are above diagrams are the only ones that used in design?

    or depending on need other type of diagrams are use in object oriented analysis and object oriented design

  15. Nitin Chugh Avatar

    Coin Game constructor needs to be corrected. It is assigning everything to First player

  16. Esha Chakraborty Avatar

    extremely helpful tutorial…

  17. Johan Avatar

    Thank you for making this tutorial!

  18. Ashenafi B. Avatar

    Thank you so much, you give me all these free……

  19. Robert Anic Avatar

    OOP is probably most difficult part to learn for beginner (such as me). Which classes to do, and what fields to put in class of what type, than what method will be in each class, how does method calling goes. That is hardest thing to figure out. I had no big issues with understanding of methods, classes, interfaces, even delegates, but OOP is toughest curve to learn.

  20. Yan Rui Avatar

    Thank you so much ! You could probably write a book someday !

  21. Abhinav Bhutada Avatar

    Thanks for all the tutorials.. man u rock

  22. David Avatar

    At 9:30, what is ?0:1 and how did it instantly relate to coinvalue, knowing whether it was heads or tails.

  23. Yanyan Liu Avatar

    at 15:12, why it is not player[0] and player[1], and the first will be player 1 and the second player2?

  24. Muhammad Monis Ahmed Khan Avatar

    Amazing tut…:)….which IDE you're using?

  25. Gabriel Ferraz Avatar

    Thank you for the tutorials!

  26. Tuong Nguyen Avatar

    All the essential points that i need to understand and work it out, I have learnt it back from you 😀 thank you so much for the tutorials!

  27. artem alagizov Avatar

    brilliant!
    thanks very much for that

  28. Marta Smith Avatar

    Amazing UML tutorial college refresher! Thanks!!

  29. Critical Hits Avatar

    coinValue is public so good luck changing the implementation to something sensible like an enum constant.

  30. Critical Hits Avatar

    setCoinOption storing the opposite of the parameter you pass is ridiculous.

  31. jiggartala2008 Avatar

    wondering what is your video authoring tool? the effects are so cool. gr8 stuffs by the way.

  32. Vivek Mangipudi Avatar

    Dear Derek Sir,
    I have learned more from watching your videos than from an entire semester of classes at my university.
    Thank you so much for making crystal clear crisp and easy to comprehend video tutorials.

    Previously I took refuge in your android app dev videos for my project. It helped me a lot.
    Also Your mySQL tutorial immensely helped me in my db project.

    I thank you profusely for all these wonderful videos.

    Last week I had an exam on design patterns in OOAD  
    but I had no time to read so I spent time watching your videos and as expected I did really well in the exam.

    Now even my professor uses your videos to teach in the class. My whole class are your fans.

    Thank you

  33. Syed Priom Avatar

    Your videos are great Derek! I am doing course in Software Design…using Larman and GoF books and your tutorials are helping me a lot. 🙂

  34. David Fagone Fontolan Avatar

    It's a good class of Object oriented Design. Congratulations.

    By the way Is there any coding error or 100% coincidence?
    In three times Mark lost and Tom won.

  35. sam fireman Avatar

    This was fantastic!  It made a ton of sense and verified what i thought about the System object. I guess I need to create a Sequence Diagram so I can follow the logic that you did in developing your app. It would be pretty hard to do this with a Communications Diagram. 🙂

  36. HereToHelp Avatar

    Hey DB, one thing I've always been enormously curious about:

    Do you painstakingly edit out every little sequence in which you type something, or do you have some kind of advanced clipboard program we don't see where you copy eveyrything ahead of time and then just paste it when it's time to use it? Or do you just type faster than a speeding bullet?

    All three options seem pretty intimidating.

    Because when you write code, especially in your design pattern vids, on one hand I think it's badass that you edit out the "boring" parts that other youtubers include in their tutorials, like typing, but on the other hand it gives your vids a pace that this turtle can't keep up with.

    I literally fastforward through your talking at 1.5 speed, but then slow down for code at 0.5 speed, because the words appear so fast, and I don't have double monitors, so I gotta alt+tab between windows to see your fullscreen code, and then type it before you move on, or scroll down, or make another .java or something. And I type 70 words per minute! So it's not like I'm even that much of a turtle.

    I've actually started memorizing eclipse shortcuts JUST to keep up with your Kung-Fu pace.

  37. Jimmy Tsai Avatar

    I have a question, do people already write test cases at this stage?

  38. mjl1966y Avatar

    In the first video, you did not have the generalizations that are shown here in the class diagram.  They're aggregations, so I'm guessing the way to read them is: CoinGame has a Coin and coinGame has a Player.  (Multiplicity is not shown)  Is that about right?

  39. zabaizabai2 Avatar

    3 times the same game in the end. Sounds fishy too me… Nice tutorial though.

  40. Alexander Wolf Avatar

    Hi Derek,

    I have two questions or remarks:

    1) What's about to move the didPlayerWin(winningFlip:String) to CoinGameClass?
       IMO it does a kind of business logic and I think this should be done in the
       CoinGameClass. In that case the getCoinOption() of Player's Class makes
       suddenly sense.

    2) According your sequence diagram the coin object should be instanced in the
       startGame() method (line 21 for instance). This is importent because if the
       coin game is restarted the coin object sill has the same string after the
       program start.

    Best wishes,
    Alex

  41. Martin Schilling Avatar

    I'm currently taking a Class in C# to get me going on the OOP Topic, but my Teacher failed…
    BUT, thanks to your Videos i'm right on Track now in understanding the whole Picture.

    Thank you… and keep the Videos coming

  42. Slavko Scekic Avatar

    Line 10 should be: players[1] = new Player(player2Name); 🙂

  43. Guehel Cardier Avatar

    Thank you for your usefull video. Can you please try yo see if i might be right?
    at 13:46 the if(coinOption == winningFlip) might not work as they don,t refer to the same object don't you thing coinOption.equalsTo(winningFlip) would be better? that might explain why you have 3 lost at the end.
    at 15:37 in it seems that in the CoinGame(…) method you for forgot to set the palyer[1] when you copy past the player[0] assignment.

  44. MrPoseidon asds Avatar

    Thanks Derek you are awesome

Leave a Reply

Your email address will not be published. Required fields are marked *