0% found this document useful (0 votes)
34 views2 pages

Ahgdvh BB HSBJH Jhbask Iuah Hjbud LJJHGJ Ujhghbsdujq Hyvsbs Yhbvhjb Ubduiq KJBDH Iuhgoinh Jhuidu Uibhli8Lkkbdf Wdbuin Hyhjydf Bbdub Uy Qbudbu

The document is illegible as it contains random characters and words. No meaningful information can be summarized from it.

Uploaded by

Bubt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

Ahgdvh BB HSBJH Jhbask Iuah Hjbud LJJHGJ Ujhghbsdujq Hyvsbs Yhbvhjb Ubduiq KJBDH Iuhgoinh Jhuidu Uibhli8Lkkbdf Wdbuin Hyhjydf Bbdub Uy Qbudbu

The document is illegible as it contains random characters and words. No meaningful information can be summarized from it.

Uploaded by

Bubt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Ahgdvh bb hsbjh jhbask iuah hjbud ljjhgj ujhghbsdujq hyvsBS

YHBVHJb ubduiQ KJBDH IUHGOINH JHUIDU uibhli8lkkbdf


wdbuin hyhjydf bbdub uy qbudbu

Creational
These design patterns are all about class instantiation or object creation.
These patterns can be further categorized into Class-creational patterns
and object-creational patterns. While class-creation patterns use
inheritance effectively in the instantiation process, object-creation
patterns use delegation effectively to get the job done.
example, if the instance variable has already been instantiated, then each
time any client accesses the getInstance() method,
the synchronized method is run and the performance drops. This just
happens in order to check if the instance variables’ value is null. If it
finds that it is, it leaves the method.

1.Code

public class AnswerScriptEvaluator extends AnswerScript{


public int eval(AnswerScript as){
int m =0;
while(as.nextLine()){
if(as.getLines().contains("Design Pattern")||
as.getLines().contains("3 types")||
as.getLines().contains("Creational")){
m++;
}
}
return m;
}
}
package com.mycompany.answerscript;
import java.util.List;
public class AnswerScript {
List<String>lines;
public List<String>getLines(){
return lines;
}
public void setLines(List<String>lines){
this.lines=lines;
}
boolean nextLine() {
return false;
}
}

You might also like