The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

quickly please

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