-
Notifications
You must be signed in to change notification settings - Fork 20
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
first activity #4
base: main
Are you sure you want to change the base?
Conversation
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.
PR looks good
Suggestions:
- Change file extension to .cpp instead of .txt
- Change file name to question_1_another_example.cpp instead of first-activity.txt
I have made the suggested changes |
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.
Minor enhancement Required
Question: Difference between encapsulation and abstraction ? | ||
|
||
|
||
Answer: | ||
|
||
Encapsulation: | ||
Encapsulation is about bundling data (attributes) and methods (functions) together, and restricting access to certain parts of the object. This helps in hiding the internal details and providing a clean interface for interacting with the object. |
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.
Use proper comment syntax
#include <iostream> | ||
using namespace std; |
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.
Move it at the top of file
} | ||
|
||
|
||
The concept of abstraction only shows necessary information to the users. It reduces the complexity of the program by hiding the implementation complexities of programs. |
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.
Use proper comment syntax
|
||
|
||
|
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.
Remove unnecessary extra lines
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.
Few changes are still left, like proper comment syntax in cpp file
Moving libraries at the top of file
Removing extra spaces from the bottom of file
Answered a question "difference between abstraction and encapsulation" examples using css.