The simple structure of my problem:
1. Two files matrix1.csv and matrix2.csv
2. Class "MatrixReader" that read from files ( provide method read as collection or as Array ; validate and etc )
3. Validation class - ( provide methods: if matrices could be multiplied ( rule NxM to MxK ) ; if matrices contain bad characters and etc )
4. Class "MatrixMultiplication" that multiplied matrices extends thread provides methods: ( multiplication in multithread; multiplication in single thread; validation that multithread calc equal single thread calc )
My questions are:
1. Do I correctly understand that "MatrixReader" should implement Adopter pattern? if no what patterns should I use in my use case?
2.The second question is the validation of multiplication ( single thread - multithread ) should be in "MatrixMultiplication" class or there are better options? Many thx in advance!
Aucun commentaire:
Enregistrer un commentaire