The following UML class diagram is given (note the class Eatable is shown in italic): Elements are of pointer type. Eata
Posted: Mon May 09, 2022 6:26 am
The following UML class diagram is given (note the class Eatable is shown in italic): Elements are of pointer type. Eatable Basket o + «constant» MAX SIZE : Integer = 10 count: Integer = 0 - name: String - items + «constructor>> Eatable (name : String) 0..MAX_SIZE + get_name(): String query} + «virtual>> show () { query} + put new_item : «pointer> Eatable ) + show_contents() { query} Apple - sort: String + «constructor» Apple (name : String, sort : String + get_sort(): String { query} + "override show () { query} Provide a solution with C++ programming language according to given UML class diagram. The solution primarily should consist of implemented classes and their functions/methods. You can add to these classes additional members and call standard library facilities if they can support your solution. The implementation is up to you. The evaluation, however, will be based on your skills to demonstrate the encapsulation, class construction/destruction, inheritance, composition, delegation, dynamic polymorphism, and exception handling. Demonstrating or testing the classes is optional.