Colin I think that your java classes are absolutely excellent. Most java courses/ books seem to make the subject so hard. This video on classes has realy cleared up a lot of questions for me, thankyou so much dude
Colin, I should have posted this few years ago... I make my Java students watch this video and following along by typing the code as a Lab assignment. I ask them to do this BEFORE I start this content myself in class. Your video lecture-demo introduces and motivates this concept exactly as I would. I really like that "A Class is a data type" is the 1st sentence when starting this topic, rather than a class is a blueprint of real world objects...THANK YOU for posting this.
Colin, thx alot for the lessons, up to now i found u the clearer instructor i found on the web, even more from the one in the uni im going to, you made things very clear to me, appreciated ! god speed
wowowowowow. 6 hours hitting my head against the wall with blunt java text < a half hour with this video. hugely helped me, finished my objects lab from design to final comments in about 2 hours. You posses a fair quantity of swagger.
I want to thank you sir for the wonderful job you are doing here. Your method of teaching and the great amount of content in your classes help mr a lot to learn how to code.
Wow! You are an excellent teacher. Not only it was good hands on but it cleared a lot of concepts which my lecturer here couldn't explain properly! Request you to make more videos!
Can you explain how to make a relationship between objects. For example have person that is the owner of 20 dogs and the dogs that are pets to the person?
Wait - so what's better? When I want to declare my variables, should I be calling setters and getters or should I just declare them when the object is being created by modifying the constructor?
Better to make a constructor that has a reasonable set of parameters so that the user of your class can make an object without needing to also call the setters. Am I understanding the question?
when you need to change the object you will need to use the setter, and when you need to get something out of the object you will need to use the getter. Later I will ague that you should use the setters all the time - even from within the constructor - so that the data validation on the instance variables will always be executed.
Are you referring to something like this? public Date (int m, int d, int y){ //constructor month = setMonth(m); day = setDay(d); year = setYear(y); } And the setters return ints like this? public int setMonth (int m){ //mutator method (setter) if (m =1){ month = m; } return month; }
Hello, Thank you for making this video; it is super helpful! I have one question. I combine the accessor and the mutator, which look like this: public int getMonth( int m ) { if (m >= 0 && m
It is convention that these tasks be separated. One get and one set for each instance var. It is expected that the creator of the class will do it in the conventional way, so that you already know what to expect in code that you have never seen. Just go with it as a convention for now, and it will be comfortable later on.
Thanks for the video. Can someone please help me on this? What's the purpose for coding the methods in another class instead of the same class? Thanks guys
I think that will become more clear as you go along... for now, just say that you want to put the methods in the class that has the data that you manipulate. It will start to feel right as you look at some more examples.
I could not get my toString() to work. Says Month can not be converted to a string.Any ideas why?public String toString() { String result; result = month; return result; }
That's because month is an int. This works, result = month + ""; Because of the quotes turns it into a String. If you check the video it shows that result = month + "/" + day + "/" + year; And it works because of the quotation marks which represents a string. And if result was an int, as in int result; then result = month + "/" + day + "/" + year; would not work.
Colin I think that your java classes are absolutely excellent. Most java courses/ books seem to make the subject so hard. This video on classes has realy cleared up a lot of questions for me, thankyou so much dude
It was a good joke saying about your anniversary - "I'm gonna be in trouble if I don't set it correct". True one.
Colin, I should have posted this few years ago... I make my Java students watch this video and following along by typing the code as a Lab assignment. I ask them to do this BEFORE I start this content myself in class. Your video lecture-demo introduces and motivates this concept exactly as I would. I really like that "A Class is a data type" is the 1st sentence when starting this topic, rather than a class is a blueprint of real world objects...THANK YOU for posting this.
best teacher around. Everything just "clicks" when you explain it.
Colin, thx alot for the lessons, up to now i found u the clearer instructor i found on the web, even more from the one in the uni im going to, you made things very clear to me, appreciated ! god speed
Wow! Excellent video. Really cleared up all of my questions.
Thanks!!
nice video...and very use full videos
wowowowowow. 6 hours hitting my head against the wall with blunt java text < a half hour with this video. hugely helped me, finished my objects lab from design to final comments in about 2 hours. You posses a fair quantity of swagger.
Great tutorial. Everything starts to make sense.
I want to thank you sir for the wonderful job you are doing here. Your method of teaching and the great amount of content in your classes help mr a lot to learn how to code.
This is excellent. Both the ideas and the presentation. Thank you.
Very useful to understand the concepts of Classes and Objects
Thanks for clearing things up. Lots of Java books are complicated for no reason.
unfortunately he passed away close to the begin of the year. RIP to a legend.
informative video... thanks
clear, simple, and easy to understand
u have just saved my java life. thank you
Amazing thanks so much
Wow! You are an excellent teacher. Not only it was good hands on but it cleared a lot of concepts which my lecturer here couldn't explain properly!
Request you to make more videos!
great video...loved it
Thank you for this video. Well explained
its very well described. thank you sir.
Great video, thanks
Thank you Sir more cleared. java constructor method also more cleared.
Thanks for the great lesson!
BeautifullyExplained :)
Thank you sir, this was very helpful
Amazing thanks
very well done, thanks
Great tutorial :)
I love your video and thanks!!!
Very helpful thank you!
Really useful, thank you.
happy belated anniversary!
Brilliant video. Thankyou.
PLEASE Enlarge the font to 24 points so we can see better. Many of us have poor eyesight and old laptops.
Can you explain how to make a relationship between objects. For example have person that is the owner of 20 dogs and the dogs that are pets to the person?
"irish setter, that was funny"
lol
nice
In the class Date, when you return month and return result, where are those variables going? Are they going to the main method?
If you go to 5:39 and listen carefully you can hear Chubaka
how do I find the next piece of this tutorial? I find it very good
This is a link to the complete playlist
th-cam.com/play/PL6F117B39113D9108.html
Good tut. i leran a bit :D
Thank you! Very good video! =)
Wait - so what's better? When I want to declare my variables, should I be calling setters and getters or should I just declare them when the object is being created by modifying the constructor?
Better to make a constructor that has a reasonable set of parameters so that the user of your class can make an object without needing to also call the setters. Am I understanding the question?
Yes, perfect. So we don't really need to use getters and setters then?
when you need to change the object you will need to use the setter, and when you need to get something out of the object you will need to use the getter. Later I will ague that you should use the setters all the time - even from within the constructor - so that the data validation on the instance variables will always be executed.
Are you referring to something like this?
public Date (int m, int d, int y){ //constructor
month = setMonth(m);
day = setDay(d);
year = setYear(y);
}
And the setters return ints like this?
public int setMonth (int m){ //mutator method (setter)
if (m =1){
month = m;
}
return month;
}
IN the constructor you only need to do :
setMonth(m);
setDay(d);
setYear(y);
Hello,
Thank you for making this video; it is super helpful!
I have one question. I combine the accessor and the mutator, which look like this:
public int getMonth( int m ) {
if (m >= 0 && m
It is convention that these tasks be separated. One get and one set for each instance var. It is expected that the creator of the class will do it in the conventional way, so that you already know what to expect in code that you have never seen. Just go with it as a convention for now, and it will be comfortable later on.
Thank you!!!
you could easily generate the getter and setter methods rather than taking time typing.
Thank you!
thank you for this!
Thanks for the video. Can someone please help me on this? What's the purpose for coding the methods in another class instead of the same class? Thanks guys
I think that will become more clear as you go along... for now, just say that you want to put the methods in the class that has the data that you manipulate. It will start to feel right as you look at some more examples.
I could not get my toString() to work. Says Month can not be converted to a string.Any ideas why?public String toString()
{
String result;
result = month;
return result;
}
That's because month is an int. This works, result = month + ""; Because of the quotes turns it into a String. If you check the video it shows that result = month + "/" + day + "/" + year; And it works because of the quotation marks which represents a string. And if result was an int, as in int result; then result = month + "/" + day + "/" + year; would not work.
lol in the birthday example he chose my friend's bDay
irish setter :)
you could use alternative get and set method names but no one will work with you xD