Ruby and Ruby on Rails
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Aakhri Jung!

5 posters

Page 3 of 3 Previous  1, 2, 3

Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by Admin Sat Apr 30, 2016 2:44 am

4 mark wala a) ka Observer i think

Admin
Admin

Posts : 17
Join date : 2016-02-12

https://rubyror.forumotion.com

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by gorydog Sat Apr 30, 2016 2:45 am

a) Which design pattern is used in this program? Select from the dropdown list below.

public class ClassA{
protected ClassB objectA;
protected String propertyA;
public ClassA(ClassB obj1,String obj2){
this.objectA=obj1;
this.propertyA=obj2;
}
public void MethodA(String message){
objectB.methodA(message);
}
public void MethodB(String message){
system.out.println(this.propertyA+": "+message);
}
}

public class ClassB{
private list listClassA;
public ClassB(){
listClassA=new list();
}
public void AddClassA(ClassA classA){
this.listClassA.add(classA);
}
public void MethodA(String message, ClassA classA){
for(Class obj:listClassA){ //iterate over each element of the collection
if(obj!=classA)
obj.MethodB(message);
}
}
}

??

gorydog

Posts : 10
Join date : 2016-04-29

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by ledzep93 Sat Apr 30, 2016 2:48 am

Allow users to scan over and access the elements of a collection without knowing the underlying representation of the collection.

Iterator

ledzep93

Posts : 9
Join date : 2016-04-29

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by Admin Sat Apr 30, 2016 2:53 am

4 marks ka last wala is prototype

Admin
Admin

Posts : 17
Join date : 2016-02-12

https://rubyror.forumotion.com

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by ledzep93 Sat Apr 30, 2016 2:54 am

You sure?

ledzep93

Posts : 9
Join date : 2016-04-29

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by ledzep93 Sat Apr 30, 2016 2:57 am

Conference vaala?

ledzep93

Posts : 9
Join date : 2016-04-29

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by gorydog Sat Apr 30, 2016 2:58 am

its factory

gorydog

Posts : 10
Join date : 2016-04-29

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by ledzep93 Sat Apr 30, 2016 2:58 am

Web interface?

ledzep93

Posts : 9
Join date : 2016-04-29

Back to top Go down

Aakhri Jung! - Page 3 Empty Re: Aakhri Jung!

Post by Sponsored content


Sponsored content


Back to top Go down

Page 3 of 3 Previous  1, 2, 3

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum