All things are lawful, but not all things are profitable.
sujesh Katri wrote:some one please provide answer to me ...i will check how i did that test.
Joanne
Knute Snortum wrote:First, only put code tags around code, not comments.
Second, I think if you want a reply you should ask a specific question, not "comment on this."
sujesh Katri wrote:first class code i'm placing below...i compiled that code and then it shows no errors and i'm little bit doubt wether that one correct or not
sujesh Katri wrote:The task is to study the code, find the bugs and suggest how they should be fixed. Additionally, you can comment on any flaws in the design that aren’t specifically bugs.
Joanne
sujesh Katri wrote:i think id(data member of the class)==null (not anId==null)is it correct now.
Joanne
Joanne
sujesh Katri wrote:we are setting id value...we assign formal parmeter value to datamember.
Joanne
sujesh Katri wrote:no..because concept1 is abstract class..we don't create object directly to that abstract class.
Joanne
sujesh Katri wrote:may be we have to write if condition.
Joanne
sujesh Katri wrote:in setId (..).and i write like if(id==null){sop("...");}
Joanne
sujesh Katri wrote:what should i do now...can i throw NullPointerException to setId(..).please tell me.
Joanne
sujesh Katri wrote:please provide answer to me.
Joanne
sujesh Katri wrote:i think there is no necessary of setId(..).is it correct?
sujesh Katri wrote:i think there is no necessary of setId(..).is it correct?
Joanne
sujesh Katri wrote:if i place my code like that how much good practice that...i'm placing my code below...if we throwing exception is not good practice is n't is...we always keep that code in try and catch block...if we write catch block with our message nothing but if conditio with sop(..);is not it
part of the question. Exceptions have good and bad aspects to them, so be prepared to justify your comments.Additionally, you can comment on any flaws in the design that aren’t specifically bugs.
I've already explained why i think that is probably a bad idea, but if you can justify removing it, then that is fine.sujesh Katri wrote:so i want remove setid(..)is it good or bad
Joanne
sujesh Katri wrote:i'm trying to keep some code in try and catch but it shows error..how can i place return other != null && other.getClass().equals( getClass() ) && id.equals( ( (Concept1) other ).id ); in try and catch blocks
Joanne
sujesh Katri wrote:please tell me if there is any mistakce
Joanne
If tomatoes are a fruit, then ketchup must be a jam. Taste this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|