Jeffrey Gutierrez wrote:I understand the concept that classes in the java api are inherited, but what about classes that you make from scratch? can you make them inheritable? Say I create 7 classes and I want them all working and communicating with eachother, is there a specific way of putting them together?
I'm not sure I fully understand you question.
- Yes, you can inherit attributes (variables), operations (methods) from your classes created from scratch (it does "extend").
- To make classes working together and communicating with each other - this situation probably in a best way describes UML term "coupling". Degree at which classes are interconnected with each other.
Communication happens by sending messages (invoking methods) usually on particular instances of the class object.