Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: How many methods should be included in class definition

  1. #1
    Junior Member pyler's Avatar
    Join Date
    Sep 2012
    Posts
    23
    My Mood
    Busy
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Default How many methods should be included in class definition

    Suppose you have an abstract class say Sparrow that extends the abstract Bird class. The abstract Bird class has the abstract methods, fly() and run()

    How many methods from the Bird class should you implement in the Sparrow class?


  2. #2
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Re: How many methods should be included in class definition

    you may not implement the abstract methods of Bird class since the Sparrow class is an abstract class.

  3. #3
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: How many methods should be included in class definition

    As many as you need to implement.

  4. The Following User Says Thank You to Cornix For This Useful Post:

    pyler (April 8th, 2014)

  5. #4
    Junior Member pyler's Avatar
    Join Date
    Sep 2012
    Posts
    23
    My Mood
    Busy
    Thanks
    3
    Thanked 2 Times in 2 Posts

    Default Re: How many methods should be included in class definition

    So which is which?

  6. #5
    Member
    Join Date
    Oct 2013
    Location
    Manila, Philippines
    Posts
    285
    My Mood
    Amused
    Thanks
    6
    Thanked 64 Times in 61 Posts

    Default Re: How many methods should be included in class definition

    You may not implement, or implement as many as you need. in short it is up to you. since both classes are abstract

Similar Threads

  1. Replies: 3
    Last Post: November 30th, 2013, 05:52 PM
  2. Replies: 5
    Last Post: July 24th, 2012, 12:37 AM
  3. [SOLVED] Printwriter class: displaying File contents to screen with included formatting?
    By mwebb in forum File I/O & Other I/O Streams
    Replies: 10
    Last Post: November 25th, 2011, 11:38 AM
  4. the definition of a wrapper class
    By nickypass in forum Java Theory & Questions
    Replies: 1
    Last Post: October 17th, 2010, 01:54 AM
  5. Replies: 0
    Last Post: April 11th, 2010, 08:56 AM

Tags for this Thread