We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

A Software company is developing a website for a university using a multiple inheritance between classes. The classes include Person, Teacher, Student, GradStudent, GradTeachAsst. 

Click here to view the class diagram of given scenario

For some reasons, the project design team decided not to use multiple inheritance for GradTeachAsst class, and give two alternatives. One is to use Composition and other is combination of Single Inheritance with Composition. Being a software developer which option you will select? Justify your answer with good reasons

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 1422

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

discuss here plz

length kitni honi chaheay gdb ki??

ya GDB bilkul thek ha

ofcourse i will suggest the 2nd methode of composition because Composition is fairly easy to understand - we can see composition in everyday life: a chair has legs, a wall is composed of bricks and mortar, and so on. While the definition of inheritance is simple, it can become a complicated, tangled thing when used unwisely. Inheritance is more of an abstraction that we can only talk about, not touch directly. Though it is possible to inheritance using composition in many situations, it is often unwieldy to do so. The purpose of composition is obvious: make wholes out of parts. The purpose of inheritance is a bit more complex because inheritance serves two purposes, semantics and mechanics. Inheritance is only good while you have specific number of class but handling large numbers of objects and class composition is the best idea. Another thing to consider when using inheritance is its “Singleness”. When deriving, it can only inherit from one super class and because of this, complex structures could use composition to make them easier to manage yet composition normally uses inheritance from its own super class. A valuable side-effect of modelling object relations using composition is that it exposes dubious design far more easily than inheriting implementation would.

Please Discuss here about this GDB.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

 

Note:-

For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.

&

.•°How to Download past papers from study groups°•.

 

Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 

GDB Solution:

Being a software developer I will go with composition. Composition allows the object encapsulation to persist and both objects can continue to be managed separately, so that changing the data of one class does not affect the other class data.

Complete GDB solution. Cs304

Being a software developer I will prefer to Composition vs inheritance.
Because composition allows the object encapsulation to persist and both objects can continue to be managed separately, so that changing the data of one class does not affect the other class data.
Also
composition as when the class uses another object to interacting with objects instead of directly with the implementation of methods and fields, we hide and protect the implementation of a class. If a consumer does not know anything about an object other than its public interface, then it cannot rely on any internal implementation details.

In my point of view composition is better than combining single inheritance in composition because of the following reasons:

1)      GradTeachAsst become a dependant class which is strongly related to teachers class.

2)      Combination is a weak relation in composition.

3)       Combining a single inheritance makes complex structure because in composition derived class is directly inherited from base class.

4)      In this way design become more flexible and provides more stable business domains.

 In this way encapsulation of data increases

Please Discuss here about this GDB.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

 

Note:-

For Important Helping Material related to this subject (Solved MCQs, Short Notes, Solved past Papers, E-Books, FAQ,Short Questions Answers & more). You must view all the featured Discussion in this subject group.

For how you can view all the Featured discussions click on the Back to Subject Name Discussions link below the title of this Discussion & then under featured Discussion corner click on the view all link.

Or visit this link 

Click Here For Detail.

&

.•°How to Download past papers from study groups°•.

 

Please Click on the below link to see…

.... How to Find Your Subject Study Group & Join .... 

RSS

Latest Activity

+ M.Tariq Malik replied to + M.Tariq Malik's discussion ENG101 English Comprehension Online Quiz No 01 Fall 2019 Solution Discussion Last Date: 14-11-2019 in the group ENG101 English Comprehension
5 minutes ago
Profile IconNasir Irfani, +'innocent" BSc and Abdul Moiz Khan joined + M.Tariq Malik's group
20 minutes ago
Nasir Irfani joined + M.Tariq Malik's group
21 minutes ago
Nasir Irfani joined + M.Tariq Malik's group
21 minutes ago
Nasir Irfani joined + M.Tariq Malik's group
21 minutes ago
مخلص liked + ! ! ! ! ! Iuuoɔǝut ! ! ! ! +'s discussion Phly Dosti phir mohabbat ......
24 minutes ago
مخلص liked + ! ! ! ! ! Iuuoɔǝut ! ! ! ! +'s discussion teachers be like ..........
24 minutes ago
مخلص liked + sílєnzíσ's discussion Fall 2019 Mid Term Examinations: Make your date sheet NOW!
24 minutes ago
مخلص liked +"Mission Impossible"++'s discussion Nooriiiiiiiiiiii
24 minutes ago
مخلص liked +"Mission Impossible"++'s discussion New invention of Microsoft
24 minutes ago
مخلص liked +"Mission Impossible"++'s discussion For monsterrrrrrrrrrrrrrrrr
25 minutes ago
مخلص liked + ! ! ! ! ! ! ! Ayesha +++'s discussion cs403 assignment
25 minutes ago
مخلص liked + ! ! ! ! ! Iuuoɔǝut ! ! ! ! +'s discussion مرزا غالب
25 minutes ago
مخلص liked + ! ! ! ! ! Iuuoɔǝut ! ! ! ! +'s discussion ابھی کچھ وقت لگے گا اسے سمجھانے میں
25 minutes ago
مخلص liked Farhan Amin's discussion your vu email address will deleted
25 minutes ago
مخلص liked + ! ! BLaiRe! !+'s discussion ****Gul khan K Kam****
25 minutes ago
مخلص liked + ! ! ! ! !HaFiZa TeHreeM FaTiMa's discussion AAJZI or IZZAT.................
25 minutes ago
مخلص liked Rana Ali's discussion Alfaz
25 minutes ago
مخلص liked + ! ! ! ! ! Iuuoɔǝut ! ! ! ! +'s discussion چھوڑو کچھ الفاز ہی تو تھے
25 minutes ago
مخلص liked Azhar Sagar's discussion quiz main kese 10/10 mark la saktay hain cheating ka asan tareeqa
25 minutes ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service