Hey Professor Hank, I'm studying for my final right now and these videos are really great. Wish you could get more views on them but wanted to let you know that you've helped me tremendously.
Salam . How are you prof. I hope you are happy. In the event that I have three classes. When executing operations, the sequence is from Class 1 to Class 3. But when collecting information, it is the other way around. Meaning when operations: set, the third inherits from the second, and the second inherits from the first. But when: get operations, the first inherits from the second and the second from the third.
Hi ya. Not sure I quite understand what you are asking here, but it's impossible for a base class to inherit from a derived class. I suspect you may an error in your classes somewhere. You can share your code on our forum if you like: professorhank.freeforums.net/
Depends on what you are doing, ultimately. However, if you have private attributes (variables) you should provide setters and getters so you can both update and retrieve the values stored in those attributes.
I owe a lot to you good professor!
Hey Professor Hank, I'm studying for my final right now and these videos are really great. Wish you could get more views on them but wanted to let you know that you've helped me tremendously.
Glad you like them!
1:50 can we create the constructor from derived class without constructor from base class
Yes, because all classes are given constructors whether you write one or not.
Salam . How are you prof. I hope you are happy. In the event that I have three classes. When executing operations, the sequence is from Class 1 to Class 3. But when collecting information, it is the other way around. Meaning when operations: set, the third inherits from the second, and the second inherits from the first. But when: get operations, the first inherits from the second and the second from the third.
Hi ya. Not sure I quite understand what you are asking here, but it's impossible for a base class to inherit from a derived class. I suspect you may an error in your classes somewhere. You can share your code on our forum if you like: professorhank.freeforums.net/
Professor Hank why we do setters(mutators) in this code we need just accessors is it important?!!!!
Depends on what you are doing, ultimately. However, if you have private attributes (variables) you should provide setters and getters so you can both update and retrieve the values stored in those attributes.