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

What are the different types of actions in struts, The different types of a...

The different types of actions in Struts are: ? DispatchAction ? LookupDispatchAction ? ForwardAction ? SwitchAction ? IncludeAction

Application with two user transactions-java, 1.) Write an application with ...

1.) Write an application with two user transactions (login which includes viewAllStudents and viewStudent ) with full MVC architecture that displays the details of the selected

Explain about drawing lines, Explain about Drawing Lines? Drawing strai...

Explain about Drawing Lines? Drawing straight lines along with Java is easy. Just call g.drawLine(x1, y1, x2, y2) where (x1, y1) and (x2, y2) are the endpoints of your lines

What is externalizable interface, What is Externalizable interface? Ext...

What is Externalizable interface? Externalizable is an interface which have two methods readExternal and writeExternal. These methods give you a control over the serialization

Change to palindrome, A palindrome is a string that reads the same from bot...

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

Mention five applications of artificial intelligent system, Mention any fiv...

Mention any five applications of Artificial Intelligent System? 1)Medical Diagnosis 2)Robots 3) Games 4) Business intelligence 5)Image Recognition.

I want multiplayer backgammon game, I want Multiplayer Backgammon Game P...

I want Multiplayer Backgammon Game Project Description: We want a multiplayer backgammon as short as well as long one. It should be free and on money also. The games fronted

Define the n-tier architecture or j2ee 3-tier?, Normal 0 false ...

Normal 0 false false false EN-US X-NONE X-NONE

What are the flow control statements in java? , The flow control statement...

The flow control statements give you to conditionally execute statements, to repeatedly operate a block of statements, or to just modify the sequential flow of control.

Rmi client program, In a RMI Client Program, what are the excpetions which ...

In a RMI Client Program, what are the excpetions which may have to handled Ans) a. MalFormedURLException b. NotBoundException c. RemoteException

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