Question: In Java create an abstract interface with method to to read lines from user input(keyboard). Then method to store the lines with each word as
In Java create an abstract interface with method to to read lines from user input(keyboard). Then method to store the lines with each word as a sequence of characters(char array)
Then, in a second implementation, use that abstract interface to change the implementation to read lines from a file and store the lines with each word as a Word object(string)
Design the interface so that it stays the same while the implementations(methods) are changing(abstraction)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
