Reference no: EM131914490
One important difference between languages that provide syntax to encapsulate the definition of user defined data types is whether the syntax requires the specification details to be separated from the implementation details.
In Java programming, you can define an interface and a concrete class. Provide Java code examples that you have written yourself on:
1. One Java interface with one method.
2. Two different Java classes (also known as concrete class) that implement that method, but each class does something different. You can just write System.out.println so show something different.
3. Write a Java class with java main method that will execute the two different concrete classes and will display two different outputs.
4. Include all the code example with screen shot of your run.
In Java, you can also do superclass and subclass.
1. Write one abstract class with one abstract method.
2. Write one concrete class, which will extend the above abstract class. Just have one System.out.println to demonstrate what it does.
3. Write one Java class with main to invoke this concrete class.