Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

help for this in c++ it must include screenshot of the code's result and explained well thank you Object Relationship D Creately Reference e Below

help for this in c++
it must include screenshot of the code's result and explained well thank you image text in transcribed
image text in transcribed
image text in transcribed
Object Relationship D Creately Reference e Below is an example of different types of Object Relationships and its corresponding UML notations: Passengers Passengers Passengers Airline Start Airplane Airplane Airplane Association Directed Asscoation Reflexive Assciation Multiplicity Library Library Fixed Account Printer Books Books Bank Account Printer Setup Aggregation Composition Inheritance Realization In this lab 6, we'll explore the nuances of the relation types "part-of", "has-a". "uses-a", "depends-on", "member-of"...etc. We will show how these relationship can be useful in the context of C++ classes. Come up four (4) pair of related Classes with their simple definition (i.e. declaration only) out of the above listed eight (8) relationships. The pair of classes in relationship maybe nested declared inside of another class or individually declared, depending on their relationship. The class of objects can be reused in other relationship. That brings the max count, not min, of classes required is eight (8). For example, a Customer is associated with a Store: note: You are to come up any pair of objects that you like to demonstrate your chosen object relationships. #include #include #include using namespace std; class Store; class Customer { private: std::string m_name; std::vector m_customer; void addStore(Store *rhs); public: Customer(std::string name) : m_name(name) { } std::string getName() const { return m_name; } friend std::ostream& operator #include #include using namespace std; class Store; class Customer { private: std::string m_name; std::vector m_customer; void addStore(Store *rhs); public: Customer(std::string name) : m_name(name) { } std::string getName() const { return m_name; } friend std::ostream& operator

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions

Question

Define CASE, CASE tools, and a CASE environment.

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago