Object-Oriented Programming Spring 2022 Quiz 3 The following UML class diagram is given (note the class Eatable is shown
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Object-Oriented Programming Spring 2022 Quiz 3 The following UML class diagram is given (note the class Eatable is shown
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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!