Brian Cole wrote:
Junilu Lacar wrote:Campbell is trying to point out an example where a call using a object reference instead of a class reference actually does more than just make the code confusing
... all the Lion and Elephant instances are doing is trying to cause more confusion. The confusion is intentional, of course, but it would have been clearer to just write Animal.staticMethod(...) and be done with it.
Knute Snortum wrote:Java classes can be used for rows in an SQL table and the fields in a class for columns. An entire table might be List<MyClass>.
Carey Brown wrote:
This is a disaster waiting to happen. A 'Patient' class should be created to hold this info. Have one field in the Patient class for each of these attributes.
Piet Souris wrote:Looks nice! Is it true that the ball slows down (to us, spectators), when it approaches the event horizon? ;)
Knute Snortum wrote:An Applet, huh? Those aren't used outside of the classroom, so redoing the code in Swing or JavaFX would make sense. I'd vote for JavaFX, but there is some differing opinions on that.
Moe Jackson wrote:Can someone help me figure this code out, this topic on OCA is very confusing to me.
Can you tell me why if i was to change line 5 to number = number(number); I would see the incrementation to 2.
And if I was to change line 6 to letter(letters) I would only see abc. Thanks.
3) Sofar I've used the bounding box method myself. If that is too course however, then use the distance, radius and angle of approach of the ball(s) to determine whether there is a collision between balls or ball/brick. That complicates the formulas, so, as you said, if it is not a big problem, I would leave that for now.
Md Zuanyeed Kamal wrote: This code has been taken from java 11th edition by harbert schild chapter 13 .
Junilu Lacar wrote:
Below are some references you might want to take a look at to get a better idea of good design. Knowing about basic design principles and how to apply them to your programs is what will really set you apart from other candidates, especially if it's for an entry-level junior position. In my opinion, it's never too soon to learn about design.
Perspective: Code is design - https://www.developerdotstar.com/mag/articles/PDF/DevDotStar_Reeves_CodeAsDesign.pdf
Simple Design: https://martinfowler.com/bliki/BeckDesignRules.html
Book about the 4 Rules of Simple Design: https://leanpub.com/4rulesofsimpledesign
SOLID design: https://en.wikipedia.org/wiki/SOLID
"Clean Code" by Robert Martin - I wish all programmers would read this book first before they try to write any code in a professional capacity.
Finally, here's what Uncle Bob has to say about certifications: