Create a class Encoder
with a method encode()
. Extend this class into Base64Encoder
and URLEncoder
, each implementing the encode()
method appropriately.
Example 1:
Input: Base64Encoder
Output: "Encoding in Base64"
Example 2:
Input: URLEncoder
Output: "Encoding URL"