Page 1 of 1

Object-Oriented Programming Spring 2022 Quiz 3 The following UML class diagram is given (note the class Eatable is shown

Posted: Mon May 09, 2022 6:26 am
by answerhappygod
Object Oriented Programming Spring 2022 Quiz 3 The Following Uml Class Diagram Is Given Note The Class Eatable Is Shown 1
Object Oriented Programming Spring 2022 Quiz 3 The Following Uml Class Diagram Is Given Note The Class Eatable Is Shown 1 (133.24 KiB) Viewed 24 times
Object-Oriented Programming Spring 2022 Quiz 3 The following UML class diagram is given (note the class Eatable is shown in italic): Elements are of pointer type. Eatable Basket name: String items + «constructor» Eatable ( name : String) 0..MAX_SIZE + get_name(): String { query} + «virtual» show () { query} + «constant» MAX SIZE : Integer = 10 - count: Integer = 0 + 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.