Dear, I have a question with this exercise, that is, I can not understand how to work these BATTERIES, I understand should I use more than two, or can I load more than one data in each element? that is, for example, stack [dni] [name] [dni spouse], I know it's basic but I'm starting with JAVA.
There are two batteries, one for men and another for women. From each person knows the dni, the name and the ID of the spouse. The batteries are ordered by dni Make a function that informs for each male what is the name of his woman. If the woman is not found inform. If the woman is found but the spouse's ID is another report "TRAP".