Laborator 04
Problema 1:
Scrieti o functie care primeste ca parametru un String regex, un String text si un int x, si returneaza substringurile de lungime x care fac match pe expresia regulata.
Problema 2:
Implementati o Coada folosind fisiere ca storage.
Problema 3:
Implementati clasa MathOps unde T si G pot fi int, double sau String:
MathOps <T,G> {
int sum(T obj1, G obj2);
int div(T obj1, G obj2);
}
Problema 4:
Implementanti Map<String,dynamic> jsonSumJson(String jsonPath1, String jsonPath2), unde jsonPath1 si jsonPath2 sunt path-uri catre doua fisiere json. Operatia de adunare intre 2 fisiere json ar trebui sa rezulte intr-un json in care pentru nodurile comune se va alege valoarea din cel de-al doilea fisier json. Functia va fi scrisa intr-o librarie separata de cea din care va fi apelata.
English
Problema 1:
Write a function that takes as parameters a String regex, a String text, and an int x, and returns the substrings of length x that match the regular expression.
Problema 2:
Implement a Queue using files as storage.
Problema 3:
Implement the MathOps class where T and G can be int, double, or String.
MathOps <T,G> {
int sum(T obj1, G obj2);
int div(T obj1, G obj2);
}
Problema 4:
Implement a function Map<String, dynamic> jsonSumJson(String jsonPath1, String jsonPath2), where jsonPath1 and jsonPath2 are paths to two JSON files. The operation of summing two JSON files should result in a JSON where, for common nodes, the value from the second JSON file will be chosen. The function will be written in a separate library from the one where it will be called.