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 3 of 3

Thread: hi need help with inheritance

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default hi need help with inheritance

    hi i m a beginner creating a national database program for practice.

    i have 5 packages in my program each having 1 class

    1. general (class gen)
    class gen contains basic info like name age etc.

    2. nii ( class nii)
    this class contains identity information like nicno, mark of identification etc

    3. medical (class medical)
    this information contains the medical info like diseases, treatments etc.

    4. insurance (class insure)
    this class contains insurance info like insurance id, accidents etc.

    5. joint (class national)
    this class contains all the information of a person. gen+nii+health+medical

    now i want to extend medical with nii and nii with gen + insure with nii, and nii with general

    then i want to inherit all the classes variables above in nationals.

    so that only nationals have all the information, insure have only insrance + general+ nii information and
    medical have their information and medical and insurance cant share information with eachother..

    can any one help me please how i can do this??


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: hi need help with inheritance

    This thread has been cross posted here:

    http://www.java-forums.org/new-java/61531-hi-need-help-inheritance.html

    Although cross posting is allowed, for everyone's benefit, please read:

    Java Programming Forums Cross Posting Rules

    The Problems With Cross Posting


  3. #3
    Junior Member
    Join Date
    May 2012
    Posts
    28
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default Re: hi need help with inheritance

    i thought may be i could get answer fast. or i can get more replies and learn more -_-.

Similar Threads

  1. Inheritance problems
    By 93tomh in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 15th, 2012, 06:01 AM
  2. Generic Inheritance
    By nogaerez in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 19th, 2011, 08:31 AM
  3. Inheritance
    By lewzax in forum Object Oriented Programming
    Replies: 4
    Last Post: July 8th, 2011, 01:51 PM
  4. inheritance help
    By justin3492 in forum Object Oriented Programming
    Replies: 3
    Last Post: September 30th, 2010, 07:45 PM
  5. inheritance
    By b109 in forum Java Theory & Questions
    Replies: 3
    Last Post: May 30th, 2010, 09:23 PM