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

What is clr, What is CLR?  CLR is .NET equivalent of Java Virtual Machi...

What is CLR?  CLR is .NET equivalent of Java Virtual Machine (JVM). It is the runtime that changes a MSIL code into the host machine language code, which is then implemented ap

I need asp developer, ASP Developer- We are needed to hire an ASP develo...

ASP Developer- We are needed to hire an ASP developer for some urgent work. He needs to add a new page to an already prepared site; the page is already completed in HTML. He jus

What is a parameter, What is a parameter? Explain the new types of paramete...

What is a parameter? Explain the new types of parameters introduced in C# 4.0. A parameter is a special type of variable, which is used in a function to give a piece of informa

Similarities between class and structure, What are similarities between Cla...

What are similarities between Class and structure? The similarities between structures and classes are as follows:- 1) Both can have constructors, properties, methods, field

Connect a software application to a database backend, Connect a Software Ap...

Connect a Software Application to a Database Backend Acquire the knowledge and develop the skills needed to prototype an end user application using a rapid application dev

Design algorithm - refactoring, TASK - DESIGN ALGORITHM You are required...

TASK - DESIGN ALGORITHM You are required to design a suitable solution algorithm by using either structured chart, pseudocode or flowchart. This diagram should clarify the proce

Develop a alphabates and numbers generators screen, how we can display a a...

how we can display a alphabets by identifies an image and if its different than show someother alpbabets.

Customer management project, This is a Customer Management project. Custome...

This is a Customer Management project. Customer data is offered in a text file. The program may load this text data into its database columns. The data mapping is user definable. U

Can a .net web application consume java web service, Can a .NET web applica...

Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent  to language. It depends on WSDL and SOAP. so any one can develope the W

Counting number of words in a string - c# program, Counting Number of Words...

Counting Number of Words in a String - C# Program Anyone can suggest me the output of the following program. using System;   class CountWords { public static void

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