Solved

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

Posted on 2007-11-15
4
496 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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

713 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