Write a program to simulate functions and relations as described below
1. Enter the domain either as user defined set e.g. {1,2,4,7} or predefined set e.g. R,Z,…
2. Enter the codomain
3. Enter a set of ordered pairs that map from the domain to the co-domain.
4. Find if the input represents a function or a relation
5. If it is a function:
a. Indicate if the function is injective (one-to-one), surjective (onto), bijection, etc.
b. Find the inverse function, if possible
c. Bonus: Ask if the user wants to find the composition of two functions and allow her to enter another function and find the composition.
6. If it is a relation:
a. find the inverse of that relation
b. Indicate if the relation is symmetric, reflexive, and/or transitive
c. Find the transitive closure of the relation
d. Bonus: Indicate if the relation is an equivalence relation and find the equivalence classes
7. Bonus: use GUI
8. Bonus: make it web based