Abstract Class -Real Time Example

0 votes
In a recent interview, I was asked a broad question on "what is abstract in Java." I gave the concept, and then there were further questions about abstract, such as what is an abstract method and what is the difference between an abstract method and a concrete method, and so on. Finally, the interviewer asked me to offer a real-world example of when I should utilise or define an abstract class. I became perplexed. I provided an example, but he seemed unconvinced.

I looked it up on the internet but couldn't find anything useful.

So, can someone provide me a real-world example of when and why he defined a class as abstract in his project?
Jun 11, 2022 in C# by pranav
• 2,590 points
452 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In C#

0 votes
1 answer

Encapsulation vs abstraction real world example

Encapsulation is a technique for "information concealment," ...READ MORE

answered Jun 21, 2022 in C# by jyoti
• 1,240 points
13,341 views
0 votes
1 answer

OOP real world example

This is what I believe. OOP does not ...READ MORE

answered Jul 4, 2022 in C# by krishna
• 2,820 points
1,002 views
0 votes
0 answers

Use of interfaces, practical and real world example

I've been attempting to figure out what ...READ MORE

Jun 11, 2022 in C# by krishna
• 2,820 points
1,140 views
0 votes
0 answers

How to force overriding a method in a descendant, without having an abstract base class

This is my code using System; using System.Collections.Generic; using System.Linq; using ...READ MORE

Jun 11, 2022 in C# by krishna
• 2,820 points
1,000 views
0 votes
0 answers

When to use an interface instead of an abstract class and vice versa

This could be an OOP question in ...READ MORE

Jun 11, 2022 in C# by pranav
• 2,590 points
377 views
0 votes
1 answer

What are the differences between C, C# and C++ in terms of real-world applications?

C is a bare-bones, straightforward, and clean ...READ MORE

answered May 30, 2022 in C# by rajiv
• 1,620 points
698 views
0 votes
1 answer

Can Abstract Class have a Constructor?

Yes, an abstract class can have a ...READ MORE

answered May 11, 2018 in Java by sharth
• 3,370 points
1,165 views
0 votes
1 answer

What is abstract class in java?

A class that is declared with abstract ...READ MORE

answered Jun 11, 2018 in Java by Daisy
• 8,140 points
962 views
0 votes
1 answer

Usage of abstract class and interface

Well let me draw a clear line ...READ MORE

answered Oct 23, 2018 in Java by geek.erkami
• 2,680 points
727 views
0 votes
1 answer

Is there a way to instantiate abstract class ?

No, you are not creating the instance ...READ MORE

answered Dec 12, 2018 in Java by Sushmita
• 6,920 points
8,678 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP