answersLogoWhite

0


Best Answer

They provide the same level of abstraction and encapsulation, and similar inheritance.

The differences in inheritance: an abstract class forces you to have at least 1 subclass (otherwise this abstraction branch is useless, because you won't be able to create any instance), while a non-abstract class may have optional subclasses.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Both interfaces and classes have methods. However, only classes store data, have constructors, and have useable code.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the similarity between abstract class and class?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between abstract class and normal class?

Any class which has one or more abstract methods is called an abstract class. But in the normal class we can't have any abstract methods. We cannot create an object for the abstract classes. When we inherit the abstract class we should implement the abstract method which we inherit.


What is the difference between abstract class and final class?

20


Is similarity an abstract noun?

No


What is the difference between association class and abstract class in software designing?

Association class is describing the relationship between classes. An abstract class is just 1 class, provides some abstraction behaviors that may be (but do not have to) derived, overridden from.


What is the abstract noun of similar?

The abstract noun for the adjective similar is similarity.


Difference between abstract and final class?

Abstract class is built to promote inheritance whereas a final class is built to avoid inheritanceAn Abstract class can be extended by another class whereas a final class cannot be extended


How do you write concrete method inside abstract class?

There is no difference with method declaration and implementation between abstract and non-abstract classes. You do the exact same thing when writing a concrete method in either an abstract or non-abstract class.


Is an abstract class virtual by default?

Unlike abstract class in C++, the abstract class in C# does not have any methods defined as virtual by default. The concept of virtual are not the same between C# and C++, either. Any virtual method must be defined explicitly in C#. Related to abstract methods - interestingly, an abstract class in C# does not have to have any abstract methods. However, the reverse, if a class need to have at least one abstract method, that class must be defined as abstract.


Is similarity a concrete or abstract noun?

The noun similarity is an abstract noun; a word for what makes one thing seem like another; a word for a concept.


What is an abstract class Write the syntax Declare a pure virtual function in an abstract class?

an abstract class is nothing but class which contains both abstract and concrete methods for abstract class we r nt create object Syntax for pure abstract class is abstract class x { public void abstract y(); public void abstract z(); public void abc() { }


What is similarities between Abstract Class and Interface?

If a class has one abstract method ,the class has to be an abstract class.Methods can be implemented in abstract class.Whereas a interface is like a abstract class...the only difference being that the methods are never implemented in Interface.


How do you call an abstract class from main method?

An abstract class cannot have a constructor and hence you cannot invoke the constructor of the class - i.e., you can instantiate an abstract class and hence you cannot call the constructor of an abstract class.