Which of the following situations described is a good situation
to use an abstract class, and...
80.2K
Verified Solution
Link Copied!
Question
Programming
Which of the following situations described is a good situationto use an abstract class, and where it would be better to use thaneither a concrete class or an interface?
When some methods in the class are abstract and some areconcrete, and some variables in the class need to be private, whileother variables need to be public
When the inheriting class is closely related to the abstractclass, such as with an \"is-a\" relationship
When the objects instantiated from the abstract class hierarchyneed to be grouped together
When the class will have both concrete and abstract methods
All of the above are reasons to use an abstract class over aconcrete class or an interface
Answer & Explanation
Solved by verified expert
4.4 Ratings (872 Votes)
All of the above reasons are to use an abstarct class over a concrete class or interface Explanation Abstract class os a class declared abstract It may or may not contain
See Answer
Get Answers to Unlimited Questions
Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!
Membership Benefits:
Unlimited Question Access with detailed Answers
Zin AI - 3 Million Words
10 Dall-E 3 Images
20 Plot Generations
Conversation with Dialogue Memory
No Ads, Ever!
Access to Our Best AI Platform: Zin AI - Your personal assistant for all your inquiries!