Algebra, Signals and Datasets
The objective here is to manipulate mathematical entities in an object-oriented manner. For instances, numbers, vectors, matrixes, images, sets, etc. have all values and operators. This fact can be formalized by the following interface:
WARNING: use Numeric<X>
in plus/mult
!
Questions.
- Encode the preceding model.
- As a first application, Numbers can be represented by a class implementing the preceding interface and having an integer value as attribute (see figure below). Thus, implements numbers and show how to compute the expression "1+(2*3)".
- As a second application, Signals, or vectors, can be represented by a class implementing the Numeric interface and having a list of integers as attribute (see figure below). Thus, implements Signal objects and show how to compute the expression "[1,2]+([2,2]*[3,4])".
- As a variation of the preceding exemple and a third application, it is possible to define Sets with plus meaning union, and mult meaning intersection. Thus, implements Sets objects and show how to compute the expression "{1,2}+({3,4}*{4,5})".
- The preceding example can be generalized by adding a type variable (see figure). Thus adapt the preceding implementation and show how to compute the expression {"A","B"}+({"C","D"}*{"D","E"}).
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented
Java jva jav laurent thiry uha enseignant ensisa ecole school national alsace programmation objet approche mulhouse france java object programming oriented