Hello!
This is my first post on this forum.
I have a big problem. I have a java college project that sounds like this:
I am given a set of 20 numbers (integers). I must make all combinations of 20 numbers by 5 ( e.g. 1,2,3,4,5 ; 1,2,3,4,6 so on ) into a file. This i did.
Now comes the hard part.
I must make program that inputs the file with all combinations and filtrate them by another inputed file that contains multiple sets of 5 numbers.
Example.
Input first file: numbers.txt (all combinations)
Input second file : sets of numbers.txt
Filtrate buttons
Export filtrated file.
Let’s say that second file consist of 2 sets of numbers:
1,2,3,4,5
1,4,7,8,9
The program now reads the 2 sets and makes another 2 sets of numbers:
Level 1
Set1: 6,7,8,9,10,11,12,13,14,15,16,17,18,19,20
Set2: 1,2,3,4,5
Level 2
Set1: 6,10,11,12,13,14,15,16,17,18,19,20
Set2: 2,3,5,7,8,9
Set3: 1,4
I know that you understood the resulting sets construction: on level 1, the first set is from numbers that are not common to first set of numbers in the second file; on level 2 the numbers are exactley the first set of numbers from second file. On level 2 … and set3 is for numbers that appeard from the combined 2 sets of numbers in the second file.
Now comes even a harder part.
The program must visualy show all levels and all sets of numbers like this
Level ____Set1 __ Set3
___ Min Max Min Max Min Max Min Max
___2 __0
__2 ___2 __0 __0
The above is the FILTERING. The problem sounds loke this: Eliminate the combinations from the first file that do not match the criteria ( the conditions) :
On level 1 from Set1 eliminate the combinations that do not match from 2 to 5 numbers in the set
from set2 eliminate the combinations that do not match from 0 to 2 numbers in the set
If the Filtering was
Level ____Set1 __ Set3
___ Min Max Min Max Min Max Min Max
__0 __5
then the resulted file would contain only 1 combination : 1,2,3,4,5.
I must manualy input the condition filtering on the level sets.
Please. I realy need this for my project. I must give the project the day after tommorow and i can’t get no help from my class mates or my teacher. Thanks.