-
-
Notifications
You must be signed in to change notification settings - Fork 476
Corrected code for Inheritance which was not implementing inheritance using extends keyword #934
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… using extends keyword
Hi, @limzykenneth , can you please review my PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's some formatting changes required. Once those are fixed we can merge. Thanks!
this.x = x; | ||
this.y = y; | ||
this.speed = s; | ||
this.angle = 0.0; | ||
} | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's an extra white space here. It would help if you set your text editor to automatically trim trailing whitespaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will take care of that. Thanks!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The white space is not yet removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh, sorry, I thought of something different.
Looks good. Thanks! |
Fixes #921
Changes:
Changes Inheritance code such that both the classes SpinArms and SpinSpots extend the Spin class. As initially in Inheritance, two separate classes are defined, which are defining their own spin classes and not using extends keyword.
Changed code:
Screenshots of the change:
Intially:

After change:
