results.append("William Shakespeare (26 April 1564 - 23 April 1616) was an\n"+
"English poet, playwright, and actor, widely regarded as the greatest\n"+
"writer in the English language and the world's pre-eminent dramatist. \n");
results.append(System.lineSeparator());
}
publicStringprocess(Stringquery){
StringBuilderresults=newStringBuilder();
if(query.toLowerCase().contains("shakespeare")){
results.append("William Shakespeare (26 April 1564 - 23 April 1616) was an\n"+
"English poet, playwright, and actor, widely regarded as the greatest\n"+
"writer in the English language and the world's pre-eminent dramatist. \n");
results.append(System.lineSeparator());
}
if(query.toLowerCase().contains("asimov")){
results.append("Isaac Asimov (2 January 1920 - 6 April 1992) was an\n"+
"American writer and professor of Biochemistry, famous for\n"+
"his works of hard science fiction and popular science. \n");
results.append(System.lineSeparator());
}
returnresults.toString();
if(query.toLowerCase().contains("asimov")){
results.append("Isaac Asimov (2 January 1920 - 6 April 1992) was an\n"+
"American writer and professor of Biochemistry, famous for\n"+
"his works of hard science fiction and popular science. \n");
results.append(System.lineSeparator());
}
if(query.toLowerCase().contains("muhammad")){
results.append("Muhammad (570 - 632 AD)"+
"Founder and the central human figure of Islam, regarded by Muslims as a prophet of God and the last messenger\n"
+
"Also active as a social reformer, diplomat, merchant, philosopher, orator, legislator, military leader.");
results.append(System.lineSeparator());
}
if(query.toLowerCase().contains("newton")){
results.append("Isaac Newton (1643 - 1727)"+
"English physicist, mathematician, astronomer, natural philosopher, alchemist, and theologian.\n"+
"His law of universal gravitation and three laws of motion laid the groundwork for classical mechanics.");
results.append(System.lineSeparator());
}
if(query.toLowerCase().contains("jesus")){
results.append("Jesus of Nazareth (7-2 BC - 26-36 AD)\n"+
"The central figure of Christianity, revered by Christians as the Son of God and the incarnation of God.\n"+
"Also regarded as a major prophet in Islam.");
results.append(System.lineSeparator());
}
if(query.toLowerCase().contains("buddha")){
results.append("Buddha (563 - 483 BC)\n"+
"Spiritual teacher and philosopher from ancient India. Founder of Buddhism.");
results.append(System.lineSeparator());
}
if(query.toLowerCase().contains("einstein")){
results.append("Albert Einstein (14 March 1879 - 18 April 1955\n"+
"German-born theoretical physicist, best known for his theory of relativity and specifically mass–energy equivalence, expressed by the equation E = mc2.");