Three types of design Patterns
Polymorphism allows instances of different classes to be used as an instance of a common superclass .
For example, an
EncryptionStream object might only have a reference to an abstract
The type of encryption the
EncryptionStream performed could be adjusted by changing from a
DESCipher to an
In cryptology, RSA is an algorithm for public-key cryptography.
It was the first algorithm known to be suitable for signing as well as encryption,
and one of the first great advances in public key cryptography.
RSA is widely used in electronic commerce protocols, and is believed to be secure given sufficiently long keys and the use of up-to-date implementations.
Real World Example of Polymorphism:
Example 1: A Teacher interacts with student. A Teacher interacts with his or her seniors.
Example 2: Person interacts with genetic offspring in house at the same time that person interacts with an empoloyee in the office.
Here teacher is an object but the attitude is different based on the situation.
Example 3: Your mobile phone, has one name of many forms:
- As phone
- As camera
- As mp3 player
- As radio