D.2 Features of OOP Exercises
1. Define the term encapsulation.2. Explain the advantages of encapsulation.3. What is the JAVA keyword that indicates that one class inherits another?4. Consider the following codeWrite the code for a Monkey class which inherits the class Animal and which has the following additional instance variables:ID (eg MN001)Name (eg Oscar)Species (eg Mandrill)Do not include any methods apart from the constructor.
To access the contents of this site, you must subscribe.