Question: b . Using the Dependency Inversion pattern we can do even better by creating an abstract interface called EncryptionMethod that will become the interface between

b. Using the Dependency Inversion pattern we can do even better by creating an abstract interface called EncryptionMethod that will become the interface between high level client code and the lower level encryption/decryption methods. In addition to encrypt() and decrypt() methods we could also put the setPassword() method into the interface and add a getPassword() method that would return a string representation of the internal password data to make testing setPassword() easier.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!