I used different types of cases to decorate the term 'latest'. Now the value in latest will be separated into confirmed cases, dead cases and recovered cases. This action increases the flexibility of the code(more extension). However, the disadvantage of this decorator pattern is that there're some extra classes now. Hope this helps!
I used different types of cases to decorate the term 'latest'. Now the value in latest will be separated into confirmed cases, dead cases and recovered cases. This action increases the flexibility of the code(more extension). However, the disadvantage of this decorator pattern is that there're some extra classes now. Hope this helps!