Solved

Java abstract class extending abstract class - do I need to declare abstract methods in 2nd abstract class?

Posted on 2007-11-15
4
503 Views
Last Modified: 2012-05-05
Hi,

I'm writing some Java classes and I would like to have the following structure:

abstract class submittedForm

abstract class submittedFormType extends submittedForms

class formA extends submittedFormType

Question:

A: Is this a valid way to design my code with an abstract class extending an abstract class?

B: If I declare an abstract method in submittedForm, can I wait to implement that method in formA, or do I also need to reference that abstract method in the submittedFormType abstract class as well?

Thanksin advance,
Courtenay
0
Comment
Question by:courtenayt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 24

Accepted Solution

by:
sciuriware earned 500 total points
ID: 20289640
A) valid but may be error prone.
B) not to be repeated in the extended class but implemented in the final class.

;JOOP!
0
 
LVL 1

Author Comment

by:courtenayt
ID: 20289685
Thanks!
0
 
LVL 1

Author Closing Comment

by:courtenayt
ID: 31409337
fast response
0
 
LVL 24

Expert Comment

by:sciuriware
ID: 20289707
:)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This video teaches viewers about errors in exception handling.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question