C
C#9mo ago
Yori

❔ Definition of Abstraction in C#

Hi guys, I have a question about abstraction in C#. M y teacher wants me to relate this to the key principles of object oriented programming: abstraction. M y anwser is:
Abstraction in the Bank class is achieved by encapsulating data, providing controlled access through methods, and abstracting the high-level operations that a bank can perform. This allows users of the class to interact with the class using a simplified high-level interface, hiding the internal complexities and details of the bank's management of accounts and transactions.
Abstraction in the Bank class is achieved by encapsulating data, providing controlled access through methods, and abstracting the high-level operations that a bank can perform. This allows users of the class to interact with the class using a simplified high-level interface, hiding the internal complexities and details of the bank's management of accounts and transactions.
Is this a good explanation as my teacher thinks it not 😭
8 Replies
Denis
Denis9mo ago
This seems fine to me? Can they at least give a pointer as to what is wrong? Or are they asking about abstract classes? Then the question is formulated weirdly
Yori
Yori9mo ago
My tutor response was: 'Abstract classes have nothing to do with the concept of Abstraction, it is just that it is used in Inheritance, which is one of the ways that abstraction is applied to code design (abstracting out the generalised features). '
Denis
Denis9mo ago
What is the bank class
Sonath
Sonath9mo ago
yeah if the bank class was declared as abstract that might get things confusing, but overall I don't see anything wrong with what you said
Tvde1
Tvde19mo ago
That is a perfectly good explanation. Why your teacher thinks you are talking about abstract classes, is beyond me.
Denis
Denis9mo ago
If the teacher gives you a hard time, you can request a second opinion.
Tvde1
Tvde19mo ago
or explain that you did not mean "abstract class" you mean that the Bank class is an example of abstraction because ...
Accord
Accord9mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.