[Show all top banners]

RadhaKrishna
Replies to this thread:

More by RadhaKrishna
What people are reading
Subscribers
:: Subscribe
Back to: Computer/IT Refresh page to view new replies
 benefits of proper inheritance

[Please view other pages to see the rest of the postings. Total posts: 27]
PAGE: <<  1 2  
[VIEWED 19385 TIMES]
SAVE! for ease of future access.
The postings in this thread span 2 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 11-12-15 2:23 AM     [Snapshot: 100]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

COPIED FROM GOOGLE SEARCH:

Inheritance Advantages and Disadvantages

Advantages:-

One of the key benefits of inheritance is to minimize the amount of duplicate code in an application by sharing common code amongst several subclasses. Where equivalent code exists in two related classes, the hierarchy can usually be refactored to move the common code up to a mutual superclass. This also tends to result in a better organization of code and smaller, simpler compilation units.

Inheritance can also make application code more flexible to change because classes that inherit from a common superclass can be used interchangeably. If the return type of a method is superclass

Reusability -- facility to use public methods of base class without rewriting the same
Extensibility -- extending the base class logic as per business logic of the derived class
Data hiding -- base class can decide to keep some data private so that it cannot be altered by the derived class

Overriding--With inheritance, we will be able to override the methods of the base class so that meaningful implementation of the base class method can be designed in the derived class.

Disadvantages:-

1.One of the main disadvantages of inheritance in Java (the same in other object-oriented languages) is the increased time/effort it takes the program to jump through all the levels of overloaded classes. If a given class has ten levels of abstraction above it, then it will essentially take ten jumps to run through a function defined in each of those classes

2.Main disadvantage of using inheritance is that the two classes (base and inherited class) get tightly coupled.
This means one cannot be used independent of each other.

3. Also with time, during maintenance adding new features both base as well as derived classes are required to be changed. If a method signature is changed then we will be affected in both cases (inheritance & composition)

4. If a method is deleted in the "super class" or aggregate, then we will have to re-factor in case of using that method.Here things can get a bit complicated in case of inheritance because our programs will still compile, but the methods of the subclass will no longer be overriding superclass methods. These methods will become independent methods in their own right.


Inheritance offers the following advantages --
Developement model closer to real life object model with hierarchical relationships
Reusability -- facility to use public methods of base class without rewriting the same
Extensibility -- extending the base class logic as per business logic of the derived class
Data hiding -- base class can decide to keep some data private so that it cannot be altered by the derived class
 
The postings in this thread span 2 pages, go to PAGE 1.

This page is only showing last 20 replies
Posted on 11-13-15 10:57 AM     [Snapshot: 451]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

hey cp21,
You have shown that what level you belong to. Ma gaye jati gali garnu xa gara.
 
Posted on 11-13-15 1:46 PM     [Snapshot: 506]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 
 
Posted on 11-13-15 1:49 PM     [Snapshot: 507]     Reply [Subscribe]
Login in to Rate this Post:     2       ?     Liked by
 

कस्तो काम नै न लाग्ने, लंगड, खाते, अमर्यादित, अपरिपक्क, अबास्ताबिक, अहंकारी, अहम्मी, रिसा स्वभाव को मान्छे रहेछौ तिमि त चन्द्र प्रकास भाइ !
त्यसरी मुख छाडेर के नै पाउछौ र तिमि ले... हामि सबै ले तिम्रो मजाक बनाएको हैन के! मात्र यो चाहन्छौ कि तिमि आफु मेहेनत गर ! देश छाडेर परदेश मा आएको छौ, केहि आफ्नै बल बाट गर पो भन्न खोजेको हो भाइ !मुख छाडेर के नै पाउछौ, झन् तिमि लाइ अझ अरु ले पनि चिडयाउन थाल्छ तिम्रो comments देखेर अनि पढेर !
हेल्प पनि माग्छौ है अनि कसैले केहि प्रतिक्रिया दिने बित्तिकै खलासी, कुल्ली अनि कबाडी ले बोल्ने सब्द ले बोल्छौ अनि गालि गर्छौ ! त्यो त भएन नि भाइ ! जसरि तिमि ले साझा प्रयोग गरेको छौ, त्यस्तै हो हामि ले पनि प्रयोग गर्ने, जसरि तिमि प्रश्न राक्छौ, त्यसरी नै हामि ले पनि तिम्रो प्रश्न मा प्रतिक्रिया दिन पाउछौ के भाइ !
न रिसाउ, रिस ले तिम्रो नै रक्त चाप बढ्ने हो, हाम्रो त के नै हुञ्छ र तिमि रिसाउदा!
कत्ति पटक मैले तिम्रो प्रश्न को उत्तर दिएको छु, आझ आफु मेहेनत गर न भाइ भन्दा गालि गर्नु पर्ने त केहि थिएन त भाइ ! त्यै गालि गरेको मा यो thank you note तिमि लै है त ! Have a great weekend Bhai ! Sorry if I was trying to be your Hero, which I know, I am not.
 
Posted on 11-13-15 2:19 PM     [Snapshot: 539]     Reply [Subscribe]
Login in to Rate this Post:     2       ?     Liked by
 

cp21, People are trying to help you out but you are proving yourself an idiot with your comments. Bro, you need to put an effort from your side as well to learn CS concepts and programming. The way you are asking simple questions without enough studying is just irritating. And, this is coming from a CS student myself . It will be on your benefit if you study the material first and may be watch some youtube videos.
 
Posted on 11-13-15 2:24 PM     [Snapshot: 552]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Does it hurt anyone if I POST a FUKING QUESTION?

If you don't want to respond, then mind your FUkING business.... Whoa these idiots keep piling up... OMG what is up with these idiots... I have done all my studying as, but I want people to share their perspective on given topic.

Lastly, I'm not your bro!


Last edited: 13-Nov-15 02:27 PM
Last edited: 13-Nov-15 02:28 PM

 
Posted on 11-13-15 2:37 PM     [Snapshot: 563]     Reply [Subscribe]
Login in to Rate this Post:     2       ?     Liked by
 

@ cp21:

Yes CP21, an idiot see everyone an idiot because he thinks he is the smartest person in the planet. So it makes sense to us when you time and again tells everyone of us idiot. And it is because you are the biggest dumb ass, idiot in this whole planet. Put your ass in the library and study.
Yes, you are nobody's bro because you do not deserve to be anyone's bro. You are just that cheap ass retarded bastard son of your mother who even does not who your father is so far.
This forum is not the property of yours... so make it clear and understandable that if you post any such stupid, lazy ass questions, you will get a backlash.
Now, be a quite kid! and go home and ask your mother who your father is... that you need to find first. Once you know who your father is, ask him to whip you ass. you need some manners, kid!
Also, stop using this site, this site is not for the person like you who misuse it. Moreover, it is NOT for kids like you.
 
Posted on 11-13-15 2:50 PM     [Snapshot: 572]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I feel sorry that your mother dropped you on your head when you were just 9 months old. Hence, a retarted little fuker who continues to lurk around this thread.

If you reply back then its a fact that you were dropped during birth.
 
Posted on 11-13-15 3:00 PM     [Snapshot: 590]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

@ cp21:

Since you started attacking an individual's character and personality, I am not going to leave you like this. You will get responses on every post you publish. Will try to always divert the topic you posted unless and until you SHUT your mouth up, util, you really start putting your ass on study, until you correct your mistakes and apologize to all publicly (Which I know you will never do. Coz, you do not have the guts, coz you are not a human).
You are the son of your whore momma who still is searching his father
 
Posted on 11-13-15 3:05 PM     [Snapshot: 597]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I rest my case!!! Poor little boy with his itty bitty microscopic penis.
 
Posted on 11-13-15 3:10 PM     [Snapshot: 608]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

@ cp21:

Ask your mother whose disk is microscopic...?? She will tell you about mine too... coz she really enjoyed that in her ass....
 
Posted on 11-13-15 4:16 PM     [Snapshot: 662]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

@cp21,
First of all, I am sorry if I initiated your anger. All I wanted to tell you was to put some efforts into it before you ask general questions whose answers can simply be found. If you don't find the solutions, then ask professionals so that we could find the solution together. Thats all I wanted to say.
@ Radhakrishna
Sorry Dai for initiating all this shits. I didn't mean it but it happened. Just chill chill!!

 
Posted on 11-13-15 4:38 PM     [Snapshot: 684]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

It is fine Pharsi.

This cp21 is just a piece of shit and fool. He needs to learn how to talk. Does not have any manner or respect for anyone. The person who does not respect others does not respect himself as well. He really needs medical help because he thinks he knows all and he can just bully anyone when somebody reacts to his dumb and lazy ass questions. It is absolutely not fair.

Well, I do not act like this mostly, I am not rude and inappropriate person, I apologize for all the rudeness and nonsense I am talking which might be offending/insulting to most of us...

BUT SOMEBODY TOLD ME THAT TO TEACH A FOOL A LESSON, YOU MUST ACT AS A FOOL YOURSELF... Because a fool only understand his own language, that is fool's language.
 
Posted on 11-13-15 4:43 PM     [Snapshot: 694]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

@RadhaKrishna
“Never argue with an idiot. They will only bring you down to their level and beat you with experience.”

I don't even know why you bother to copy paste from google and answer which he could have easily done.. just ignore bro!
 
Posted on 11-13-15 4:56 PM     [Snapshot: 688]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

Cp21,
Can I tell you something? Calm yourself down and listen to me. I was the one who initiated all the fights here so you can say anything to me. But, Radhkrishna genuinely helped you and you are giving him all this in return. I strongly believe that this isn't right and appropriate, and you owe an apology to Radhakrishna.
 
Posted on 11-13-15 5:02 PM     [Snapshot: 710]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Radhakrisn: I know you would like to give a genuine advise and easiest thing is to advise. And very few people take it seriously , rest will see it negatively and may take it is as a parental advise. 
I see a lot new thread because of your advise?

Last edited: 14-Nov-15 07:30 PM

 
Posted on 11-13-15 5:42 PM     [Snapshot: 761]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

magorkhe1, the new threads are because of cp21's ego, immaturity and anger management issues.

Radhakrishna and Pharsi, it's not worth arguing with chandra prakash. So, ignore him and have a nice weekend.
 
Posted on 11-13-15 5:45 PM     [Snapshot: 772]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

@ magorke1:

It is fine buddy... I can understand what you are saying. Most probably you did not get from where it begin. It is not today's story alone.
This little bastard cp21, who is a nepali, says that he does not know nepali... and starts abusing genuine person who helps him with his stupid lazy ass questions which he can easily find googling it. And when somebody says him something, he starts abusing that person. And he has been doing that for a long time.
He thinks that he is studying in IT field, most probably would always call him as an ENGINEER, but in reality is sucking cheap ass dhoti's dick in a consultancy and shows the manner of a cheap ass third class individual by abusing and disrespecting all.
Enough is enough for this bastard child.
Whatever advice it is, we are not telling him how to live his damn retarded fucking life. We are just asking him to pay some respect and have some manners.
But it is just an another day to him, I know that. Few days back, he was fighting with somebody else, today he started bullshitting with me and tomorrow, you may the person, who know.
Thanks for your advice though. Will keep in mind.

 
Posted on 11-13-15 6:21 PM     [Snapshot: 798]     Reply [Subscribe]
Login in to Rate this Post:     2       ?     Liked by
 

cp21 should have some respect to people who genuinely help others in sajha, like Mr. RadhaKrisha. No body is paying anyone for help or their valuable time giving suggestions. It's for free and comes only because we Nepalis have lots of empathy and at one time we all have been through the same situations. cp21 should have respect for RadhaKrishna ji. He has genuinely helped lots of people in sajha and always give honest answers. If he's telling you to study you should take it as a suggestion from a big brother and maybe in your best interest to do so.
 
Posted on 11-13-15 6:34 PM     [Snapshot: 808]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

CP भाई , गूगल मा एउटा click गरेर पाइने उत्तर लाइ तिमि ले येहा पोस्ट गरेउ तै पनि अरु ले उत्तर दिए | धन्यबाद दिन त कता हो कता हो उल्टो गालि गर्न मा उत्र्रेउ ! लाज लाग्दैन भाई ?
*भाई किन भनेको भन्लाउ , तिम्रो बोलि चाली कुरो गरे को ताल हेरेर दाइ त के मित्र नि भन्न मन लागेन !
 
Posted on 11-13-15 7:08 PM     [Snapshot: 848]     Reply [Subscribe]
Login in to Rate this Post:     1       ?     Liked by
 

Hey Chandra Prakash - Fuck You.
 



PAGE: <<  1 2  
Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 60 days
Recommended Popular Threads Controvertial Threads
##केटा हो ,*Monthly* कती *SAVE* हुन्छ ? ##
ChatSansar.com Naya Nepal Chat
🙏 दलाल स्ट्रिट 🙏
सालीको चाक
Intellect of Sajhaites and Nepali in general
जोईटिङ्रे को उदय
भाते मुखियाबा
Corona virus - how deadly is it really? and for whom?
साझाका लेखाईले आतंकित बनाउछ
मेरो नेपाल यात्रा
Ring Ring!
Mero USA yatra
सालीको पेन्टी
Joe Biden fondling kids
अरुलाई हाम्रो धर्मको चिनारी कसरि दिने / हिन्दुत्व बारे हाम्रो जानकारी ?
My facebook archive (for sale)
" म किन हिन्दु होईन" पढ्नु भएको छ ? Must read and know about Hinduism
सरस्वति /सरस्वति बन्दना
Unlawfully Entered TPS holder can Apply for Green Card
Saroj Sai - Cover Songs - Music
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters