Solved

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

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

Industry Leaders: 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

Title # Comments Views Activity
iterator/ListIterator approach 17 68
Facing this issue for maven proxy setting 2 45
Java basic valueOf question 1 51
collection output issue 9 95
In this post we will learn different types of Android Layout and some basics of an Android App.
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 third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

751 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