Question

Why does object aggregation require performing deep copies (emphasis on two security issues)? Java

Why does object aggregation require performing deep copies (emphasis on two security issues)? Java

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Solution: An object aggregate is nothing but a combination of multiple objects. For instance, the AirPlane class would contain an Engine, Wing, Tail, Crew Objects, etc. Or in simple words, it refers to the class having an entity reference. For instance, an Employee object would contain information such as id, name, email-id, etc. but it would also contain one more object which can be named as the address that may contain information such as city, state, country, zip code, etc. On the other hand, the deep copy refers to the copy of a parent object that actually makes copies of the dynamically allocated memory pointed to by the fields. It is used when a particular object is to be copied along with the objects to which it refers.

The object aggregation mainly involves the creation of the deep copies of the objects in order to make sure that the exact structure of the parent object is copied into the child object. This is important from the security point of view as it makes sure that even the child object contains the relevant information related with the parent object. The fact that it copies the object to which it refers also makes sure that the object does not lead to the memory leakages that might take place in case of a static allocation of the memory, but since here it is a dynamic memory allocation, therefore, the code is free at that front too. So these are the two factors due to which, the deep copies are created.

Here's the solution to your question, please provide it a 100% rating. Thanks for asking and happy learning!!

Add a comment
Know the answer?
Add Answer to:
Why does object aggregation require performing deep copies (emphasis on two security issues)? Java
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT