Register Login
Internet / AI Technology University (ITU/AITU)
Created by info@itofthefuture.com
Welcome Anonimous.User to this quiz related to Wml.

Read the question and choose correct answers. Time is limited to 40 seconds!

Important! Do not forget to rank the quality of the question (from bad to excellent).
An initiator of the quiz will get royalty score for QnAs created by her/him and can win the Top Creativity Prize.
Question:
To simplify the creation of WML code a so called presentation factory can be used, which defines methods that create the code. Given the following method of a presentation factory, identify methods that use the provided method to produce valid WML code. private String addURLtoLink(String url) { // note: use StringBuilder with 5.0+ StringBuffer wml = new StringBuffer(); String[] splits = url.split("\\?", 2); wml.append("<go href=\""); wml.append(splits[0]); wml.append("\">\n"); if (splits.length > 1) { splits = splits[1].split("\\&"); //& } String[] nameValues; for (int i = 0; i < splits.length; i++) { nameValues = splits[i].split("="); if (nameValues.length > 1) { wml.append("<postfield name=\""); wml.append(nameValues[0]); wml.append("\" value=\""); wml.append(nameValues[1]); wml.append("\"/>\n"); } } wml.append("<postfield name=\"mode\" value=\"wml\"/>\n</go>\n"); return (wml.toString()); }

public String addLink(String url, String name) {
String wml = " <anchor>" + url;
wml += addURLtoLink(name);
wml += "</anchor>\n";
return (wml);
}



public String addHomeLink() {
String wml = "<anchor>Home";
wml += "http://ourcompany.com?page=start";
wml += "</anchor>\n";
return (wml);
}



public String addHomeLink() {
String wml = "<anchor>Home";
wml += addURLtoLink("http://ourcompany.com/?page=start");
wml += "</anchor>\n";
return (wml);
}



public String addLink(String url, String name) {
String wml = " <anchor>" + name;
wml += addURLtoLink(url); // add URL with parameters
wml += "</anchor>\n";
return (wml);
}



public String addLink(String url, String name) {
String wml = " <anchor>";
wml += addURLtoLink(url);
wml += "</anchor>" + name + "\n";
return (wml);
}



Rank the Quality of the Question from "-10" (bad) or "0" (not clear) to 10 (correct) or even 20 (very good!)
-10 (bad/wrong) 0 (not clear) 10 (correct) 20 (very good!)
Your summary report will be available to you and your instructor. Thank you for your work!!!