Abstract classes, DOT NET Programming

Assignment Help:

What are abstract classes?

The features of the abstract class are as follows:-

1.     You can not create an object of the abstract class.

2.     The Abstract class is designed to act as a base class (to be inherited by another classes). In the program development  the Abstract class is a design concept and provides a base upon which other classes are built.

3.     The Abstract classes are similar to the interfaces. After declaring an abstract class, it can't be instantiated on its own, it must be inherited.

4.     In VB.NET abstract classes are created by using the "MustInherit" keyword.In the C# we have "Abstract" keyword.

5.     The Abstract classes can have implementation or pure abstract methods which must be implemented in the child class.

Public MustInherit Class ClsAbstract

' use the mustinherit class to declare the class as abstract

Public Function Add(ByVal intnum1 As Integer, ByVal intnum2 As

Integer) As Integer

Return intnum1 + intnum2

End Function

' left this seconf function to be completed by the inheriting class

Public MustOverride Function MultiplyNumber(ByVal intnum1 As

Integer, ByVal intnum2 As Integer) As Integer

End Class

Public Class ClsChild

Inherits ClsAbstract

' class child overrides the Multiplynumber function

Public Overrides Function MultiplyNumber(ByVal intnum1 As

Integer, ByVal intnum2 As Integer) As Integer

Return intnum1 * intnum2

End Function

End Class

1945_abstract classes.png


Related Discussions:- Abstract classes

Classic ado and ado.net , What are major difference between classic ADO and...

What are major difference between classic ADO and ADO.NET ? Some major differences between the classic ADO & ADO.NET are as follows: 1) As in the classic ADO we had server a

How can inheritance is achieved in vb.net?, How inheritance is achieved in ...

How inheritance is achieved in VB.NET? The Inheritance is achieved by using "Inherits" keyword in the VB.NET (& For C# it is ":"). Easy Sample is provided in CD for understandi

Developer of a asp.net mvc4 entityframework, Small website using ASP.NET MV...

Small website using ASP.NET MVC 4 EntityFramework 5 Project Description: We are seeking a developer to a ASP.NET MVC4 EntityFramework website using the subsequent tools: Visu

Manual reset event and auto reset event, What is Manual Reset Event and Aut...

What is Manual Reset Event and Auto Reset Event? The Threads that call one of the wait methods of a synchronization event should wait until other thread signals the event by ca

Case statement, Design the following interface and add code to the command ...

Design the following interface and add code to the command buttons to achieve the following using case statement. I) find coursework to be calculated using the following formula:-0

What is reflection, Reflection All .NET assemblies have metadata inform...

Reflection All .NET assemblies have metadata information stored  the types defined in the modules. And This metadata information can be accessed by mechanism called as "Reflect

I want simple academic project, Project Description: I want very simple ...

Project Description: I want very simple app in C# in visual studio Windows forms app Very simple database management app - three buttons - search , delete, add records and

Fill factor, What is fill factor? The 'fill factor' option describes ho...

What is fill factor? The 'fill factor' option describes how full SQL Server will make each index page. When there is no free space to insert a new row on the index page, the SQ

Load multiple tables in a data set, How can we load multiple tables in a Da...

How can we load multiple tables in a DataSet ? objCommand.CommandText = "Table1" objDataAdapter.Fill(objDataSet, "Table1") objCommand.CommandText = "Table2"

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd