samaniehsan / auto-scheduler

automatically generate a schedule for college student
1 stars 1 forks source link

April 30 grouping #62

Closed vjara98 closed 5 years ago

vjara98 commented 5 years ago

While I want student to extend NameTuple, it creates conflicts in the following code piece in StudentGrouping:


        Student student;
        keys = new ArrayList<NameTuple>(repository.keySet());

        for(int i = 0; i < repository.size(); i++){

            do{
                NameTuple randomKey = keys.get(random.nextInt(keys.size()));
                Long value = repository.get(randomKey);
                student = new Student(randomKey, value);

            }while(isDuplicate(student) == true && !studentList.isEmpty());

            studentList.add(student);
        }

Student takes in NameTuple and a value. These two parameters generate the randomizing. Don't know how I would implement this if I made stupid have three parameters instead (String name and last name). Suggestions?

samaniehsan commented 5 years ago

@vjara98 feel free to merge ti.