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

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
LVL 1
courtenaytAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
sciuriwareConnect With a Mentor Commented:
A) valid but may be error prone.
B) not to be repeated in the extended class but implemented in the final class.

;JOOP!
0
 
courtenaytAuthor Commented:
Thanks!
0
 
courtenaytAuthor Commented:
fast response
0
 
sciuriwareCommented:
:)
0
All Courses

From novice to tech pro — start learning today.