"Write a java program that illustrates: Inheritance, Overriding-Overloading, Polymorphism, Abstraction, Encapsulation, Interfaces with a set of related classes." Do you have any basic example to understand all of them in a program?
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.
"Write a java program that illustrates: Inheritance, Overriding-Overloading, Polymorphism, Abstraction, Encapsulation, Interfaces with a set of related classes." Do you have any basic example to understand all of them in a program?
Welcome to the Forum! Please read this topic to learn how to post code correctly and other useful tips for newcomers.
Moved to Java Theory and Questions.
mottogo (June 9th, 2014)
Have you tried any of the online tutorials?
Oracle : Trail: Learning the Java Language (The Java™ Tutorials)
Tutorialspoint : http://www.tutorial
Java Beginner: http://www.javabeginner.com/learn-ja...java/index.htm
Google is your friend. There are many of these tutorial sites to choose from.
If this is a college assignment - check over what work you have recently done in each aspect
of the question. It's basically asking you to combine all you have learned to create a single
project to test your skills in the said areas.
Create one piece at a time - test it - debug it - test it
Only when that works for one single part - you can confidently move on to the next part.
Ask away on the forum of you need help - but remember to post your code too
Wishes Ada xx
If to Err is human - then programmers are most human of us all.
"The Analytical Engine offers a new, a vast, and a powerful language . . .
for the purposes of mankind."
— Augusta Ada Byron, Lady Lovelace (1851)
Come up with some sort of class you want to use. Maybe an Animal.
Then try to figure out how you can relate those terms to the program.
You could have a Fish class that extends the Animal class. (inheritance)
Have the Fish class override a breathe method in Animal.(overriding/polymorphism)
and so on....
basically I think it might help to come up with an idea first then see how you can apply these terms.
Then once you have more of an idea what you are doing you can ask more specific questions and get more useful answers.