This Java program simulates the random selection of genes and calculates the selection percentages based on assigned weights.
- Reads 18 genes from user input (only A, T, S, L are accepted)
- Randomly selects 6 genes
- Counts the occurrence of each gene
- Calculates the weighted selection percentage for each gene
Enter 18 genes from A, T, S, or L: A T S L A S T L A T S L A T S L A T Selected genes: [A, T, S, L, A, S] A: 2 T: 1 S: 2 L: 1 Selection percentage of A: 33.33% Selection percentage of T: 16.67% Selection percentage of S: 33.33% Selection percentage of L: 16.67%