When should i use abstract classes and interfaces, JAVA Programming

Assignment Help:

When should I use abstract classes and when should I use interfaces?

 Use Interface, when:

  • Design changing often or when various implementations only share method signatures.
  • When we need some classes to use some methods which we don't want to be included in class.

Use Abstract Class, when:

  • Several implementations are of the same kind and use common behavior.
  • Enabling with generalized form of abstraction and leave implementation task with inheriting subclass.
  • creating planned inheritance hierarchies

 


Related Discussions:- When should i use abstract classes and interfaces

Midlet game, do you have example of a simple midlet game ?

do you have example of a simple midlet game ?

How many static initializers can there, How many static initializers can yo...

How many static initializers can you have ? As many as you want, but the static initializers and class variable initializers are implemented in textual order and may not refer

Three ways in which a thread can enter the waiting state, What are three wa...

What are three ways in which a thread can enter the waiting state ?

What is meant by universal access of internet services, What is meant by un...

What is meant by universal access of internet services ? the meaning of Universal access of internet services means same functionality to everyone.

Which models are supported by jms, Which models are supported by JMS? Pleas...

Which models are supported by JMS? Please, explain them. Ans) Publish or subscribe (pub/sub). This model permits a client (publisher) to send messages to a JMS topic. These mess

Minimumshelf, Write a program that finds the minimum total number of shelve...

Write a program that finds the minimum total number of shelves, including the initial one required for this loading process

What is the output of the following javascript code, What is the output of ...

What is the output of the following JavaScript code? name="Ali Akbar"; document.write(name.charAt(4)) ;

K-means clustering, i) Set the number of data points to 20 and the number o...

i) Set the number of data points to 20 and the number of clusters to 2. Check box Show History. Click on Initialize. Click on Start. Click on Step . Observe which points ch

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