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 is an aspect, An aspect is the cross-cutting functionality that you ar...

An aspect is the cross-cutting functionality that you are executing. It is the aspect of your application you are modularizing. An example of an aspect is logging. Logging is somet

Send input to different command prompt, I am supposed to call an external a...

I am supposed to call an external application (which is command-line based) and send input to the application from java. I created a batch file to call the application. It successf

What are the different modules in spring framework, Different modules in sp...

Different modules in spring framework are:- a)  The Core container module b)  AOP module (Aspect Oriented Programming) c)  Application context module d) JDBC abstractio

Explain about the performance aspects of core java, Performance of interpre...

Performance of interpreted byte codes is sufficient but it can be improved much more than that. Byte codes are changed into machine language within no time, this speed of implement

Program to brute force search, Ask questionWrite a program BruteForceSearch...

Ask questionWrite a program BruteForceSearch that uses the brute-force approach given above and compare its running time on your computer with that of Binary Search for largeW.txt

Compression, 1 occurrence of "oog", and 1 occurrence each of "goog", "oogo"...

1 occurrence of "oog", and 1 occurrence each of "goog", "oogo",

Java 2 micro edition - programming for mobile phones, You must design, code...

You must design, code and demonstrate a J2ME program (a program capable of running on mobile telephones) according to the specification given in the next section.  The overall cour

Explain about the dynamic behavior of core java, This language was designed...

This language was designed to adapt the changing environment and behavior. New methods and instance variables can be added to the client side without any major changes happening at

Develop a supply chain management, Develop a Supply Chain Management Pro...

Develop a Supply Chain Management Project Description: Supply Chain Management from HK and China Skills required is Java

Uses of fileinputstream and fileoutputstream, Java Programming 1. Write...

Java Programming 1. Write a program in Java to find the highest of any five numbers. How do you compile and execute this Java program? 2. Write a program to explain the Exce

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