What you think c#? What is a static method? And what is the difference between a
ID: 3598028 • Letter: W
Question
What you think c#?
What is a static method? And what is the difference between an instance method and a static method?
What is class inheritance?
What is the purpose of class inheritance?
If a class A inherits a class B, what part of class A does class B inherit?
What part of class A that is not inherited from class B
If a child class (B) needs to redefine a method in the parent class (A), what should it do? And what do we call that? (considering simple inheritance)
Explain the relationship between a child constructor and its parent constructor.
What class is the parent or base class of all the classes in .Net
List the methods that each class in .Net automatically inherits.
What is the “is a” property? Explain using an example
What does polymorphism mean? Explain
What keywords must you use to apply polymorphism?
Does a child class have to override every method in the parent class?
What is an abstract method? Define such method.
What is an abstract property? Define such method.
What is an abstract class?
Can you create an instance of an abstract class? And why?
What is the purpose of an abstract class?
What is an interface? Elaborate
How is a method defined within an interface?
How is a property defined in an interface?
Explanation / Answer
Answered first 4 as per chegg policy.
static method is bind to type (class) rather than an instance. Instance method will act on an instance, while static method act on the type itself.
Inheritance is the ability to create a class from another class such that you can use mthod and field/properties defined in another class directly without explicitly defining them.
It saved time in re writting the same code (i.e., save code duplication)
It also gives a user a bility to change behaviour of the library without actualy changing already working and tested code.
Also it helps in managing your code hirerachy easily.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.