Explain abstract classes, C/C++ Programming

Assignment Help:

Abstract Classes

Abstract classes are the classes, which are written just to act as base classes. Consider the following classes.

                class base

                 {

                                :

                                :

                 };

 

class  Aclass : public base

                 {

                                :

                                :

                 };

 

                class  Bclass : public base

                 {

                                :

                                :

                 };

                class  Cclass : public base

                 {

                                :

                                :

                 };

                void main()

                 {

                   Aclass objA;

                   Bclass objB;

                   Cclass objC;

 

                                :

                                :

                }

There are three classes - Aclass, Bclass, Cclass - each of which is derived from the class base. The main () function declares three objects of each of these three classes. Though, it does not declare any object of the class base. This class is a general class whose sole purpose is to serve as a base class for the other three. Classes used only for the purpose of deriving other classes from them are known as abstract classes. They simply serve as base class, and no objects for such classes are created

 


Related Discussions:- Explain abstract classes

Ans, A palindrome is a string that reads the same from both the ends. Given...

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

Use of random function - c program , Use of random function: int main(...

Use of random function: int main(void) {    int i,j;         for(j=0;j       {      // randomize();       for(i=0;i                  printf("%d\n", ran

Minimum shelf, At a shop of marbles, packs of marbles are prepared. Packets...

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Built a web crawler , To develop a web crawler such that when given a base ...

To develop a web crawler such that when given a base URL, it will traverse the entire web tree and then build an index of keywords and what URL link they appear on.   The web crawl

Flowcharting, how to create a flowchart? can you help me in my assignment a...

how to create a flowchart? can you help me in my assignment about flowcharting ....

D, drawbacks in assignments in engeenirng

drawbacks in assignments in engeenirng

Last fibonnaci standing, i need a program for finding the last fibonacci nu...

i need a program for finding the last fibonacci number

Scrape a site and save as csv, Scrape a site and save as csv Project Des...

Scrape a site and save as csv Project Description: I want a programmer to create scraping software. I'll want every page scraped of name, job title, company, and url. There a

Tower of hanoi, application problem of tower of hanoi

application problem of tower of hanoi

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