free geoip

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is Aggregation in OOP?
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support
#1
What is Aggregation in OOP?
Reply
#2
Aggregation is a relationship between the container and contained object. Aggregation is a weaker relationship, because aggregate object is not a part of the container, and aggregate object can exist independently. Aggregation is implemented in c++ by using a pointer or reference to an object that is created inside a class.
Real world example:
A single teacher can not belongs to multiple departments, but if we delete the department teacher object will not destroy.
Example:
class Student{
--------------
};
class Teacher: public Student {
-------------------
Student * name; //Here is aggregation relationship b/w Student and Teacher class
-------------------
-------------------

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  In aggregation we use a pointer e.g. like chair object in a room class saneha 1 2,569 05-02-2011, 04:48 PM
Last Post: Vuhelper
  elaborate real difference between association and aggregation in real time percepecti saneha 1 4,320 04-29-2011, 08:43 AM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)
VU Help • House Banner VU Help Virtual University Students - Assignments, Solved Papers, GDB & Exam Help Student Help Forum • Collaborative • Free Support