UrbanPro

Learn C Language from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

When do you absolutely have to declare a class as abstract (as opposed to free-willed educated choice or decision based on UML diagram)?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Home Tutor

When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.
Comments

Software Developer and Trainer with 10 years of experience

I hope you are aware of what Abstract Class is . Lets say an Example. You are developing a Library that Detects User Interaction with the device and enable the developer to define their own response to the user. Let me Name it as an InputHandler Class. In this case, you are defining functions for...
read more
I hope you are aware of what Abstract Class is . Lets say an Example. You are developing a Library that Detects User Interaction with the device and enable the developer to define their own response to the user. Let me Name it as an InputHandler Class. In this case, you are defining functions for each user interaction line key press, mouse click, etc i.e EventDetection. Now When you define the InputHandler class. You cannot declare the functions that will be called on the appropriate user interaction, But you cannot define it, because the response is different for different applications that use the library. In this case you can make the InputHandler abstract by declaring the EvnetDetecting functions virtual. Hope you understood ... read less
Comments

Tutor

Imagine you have some set of inter related classes like mango , apple ,banana all these classes are having same functionality so instead of creating again repeated methods in these classes i will create a more generalized method fruits and in that i define the idea means how to do it and later on sub...
read more
Imagine you have some set of inter related classes like mango , apple ,banana all these classes are having same functionality so instead of creating again repeated methods in these classes i will create a more generalized method fruits and in that i define the idea means how to do it and later on sub classes will implement those ideas so in a company many people will work for 2 or 3 years and leave the company we cant take the code of them what they have written i mean to say in projects many people mainly project managers create abstract classes and later on sub ordinates will use or override the function of that idea which is present in abstract class like that it works.when project are very big we just modify the code in abstract class it will automatically modified in sub class it is like kind of relationship eg : mango is kind of fruit like that and once i declare a class abstract i have to override it if i declare it virtual then it is upto me to override or not .Now coming to interface when classes are not related like cycle , train , bus means bus is belonging to automobile class and cycle to some other class but these different classes want to implement common functionality then interface is used and it is used to overcome the draw back of multiple inheritance as i can implement multiple interfaces and there is another drawback in inheritance using base class object i cannot call the sub class function to overcome that abstract classes are used .Try this stuff using code you will understand better thank you read less
Comments

View 1 more Answers

Related Questions

What is the difference between #include and #include "file" ?
#include is meant for including standard library files, where as #include "" is for the local/ custom header files.
Kajol
How do I get 6 power 13 in c language?
By using pow(6, 13). Don't forget to import math.h header file
Tanush
0 0
5
What is the best website to learn c language?
Programming is learnt by practice. I would suggest you to refer the book by Dennis Ritchie on C programming to start with.
Nom
Does a civil engineer need to learn the C language?
C language is a common subject in the first year of engineering irrespective of the branch. It may not be helpful for your civil engineering career but you definitely need to pass for B.Tech graduation.
Sandeep
0 0
5
What does %d mean in the C programming language?
%d is not the only format specifier in C to represent integers. To be precise, %d is used to represent a signed decimal integer. Other integer types such as unsigned int, long int, etc. have their own...
Vikas
0 0
6

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

Set 0 To Kth Bit In A Variable
The following code snippet Set 0 to Kth Bit in an variable #include int UnsetBitValue(int n, int k);int main(){ printf("%d\n\n",UnsetBitValue(255,6)); return 0;}// Set kth bit to zeroint UnsetBitValue(int...

4 Things Every Tech Startup Needs to Know About The Coaching Industry
Knowledge on any subject is widely available to those who wish to learn. However, just gathering knowledge from other people doesn’t guarantee results in business. Results come from applying what...

Understanding Computer Science Concepts with Images and Videos..
All Computer science concepts relating to programming and software development are only virtual. It cannot be practically shown as a hardware parts of a computer. But for better understanding it should...

Program to swap the value of two variables without using third variable(simplest way)...
int main() { int a=10,b=20; printf("values of a before swap ="%d,a); printf("values of b before swap ="%d,b); a=a+b; b=a-b; a=a-b; printf("******************"); printf("values of a after swap...

C Program-Error Handling[Program Exit Status]
//Header files #include<stdio.h>#include<conio.h>#include<stdlib.h> //Main Function void main(){ int dividend=20; int divisor=5; int quotient; //Function for clearing screen clrscr();...

Looking for C Language Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for C Language Classes?

The best tutors for C Language Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn C Language with the Best Tutors

The best Tutors for C Language Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more