Concept of inheritance in java


Question1. What are the main differentiations between an object and a class? Demonstrate with proper examples.

Question2. Make a distinction between global variable and local variable. You might use a simple Java program to demonstrate your answer.

Question3. What do you understand by the expression ‘constructor’ in Java? Describe your answer with an relevant example.

Question4. Declare and initialise an array of kind float of size 5 to store the marks acquired by a student at his examinations. Initialise the array with the following values {65, 57, 75, 49, and 88}. Write the code fragments in Java to find:

(i) The average mark obtained by student at examinations.

(ii) The highest mark obtained by student.

(iii) The lowest mark obtained.

Question5. Describe the concept of inheritance. Demonstrate your answer with a relevant Java example.

Question6. Java doesn’t support multiple inheritances but does give the concept of ‘interface’. Explain how interfaces can help a programmer to implement multiple inheritances in their programs. Demonstrate with proper Java examples.

Question7. What is abstract class in Java? Illustrate the significance of implementing these classes in programs.  Demonstrate with an example of your own.

Question8. Using a proper Java examples illustrate the term polymorphism.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Concept of inheritance in java
Reference No:- TGS05564

Expected delivery within 24 Hours