CUSTOMER_CODE SMUDE DIVISION_CODE SMUDE

advertisement
CUSTOMER_CODE
SMUDE
DIVISION_CODE
SMUDE
EVENT_CODE
OCTOBER15
ASSESSMENT_CODE BT0087_OCTOBER15
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
36426
QUESTION_TEXT
Explain the following functions, with an example.
a. Parse float(value)
b. IsInt(value)
c. Seed (value)
SCHEME OF
EVALUATION
Parse float(value) :
(04 marks)
Description: returns the floating-pont value defined by the string value.
Parsing ends when the first character is encountered that cannot be
parse , as being part of the floating-point representation.
Parameters: value=String
Return value: Floating-point or invalid.
Exceptions: in case of a parsing error an invalid is returned.
Example: var a=lang.parseFloat(“123.7”);
//a=123.7
IsInt(value):
(03 marks)
Description: returns a Boolean value that is true if the given value can be
converted into an integer number. Otherwise false is returned.
Parameters: value=any
Return value : Boolean or invalid
Exceptions:_
Example:
Var a=lang.isInt(“-123”)
//true
Seed (value):
(03marks)
Description: initializes the pseudo-random number sequence and
returns an empty string. Zero or positive integer given value is used for
initialization. Otherwise a random initialization value is used.
If the value is a floating-point Float.int( ) is first used to calculate the
actual integer value.
Parameters: value=integer
Return value: String or invalid
Exceptions:
Example: var a=lang.seed(123);
//a=””
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
118691
Explain how to pass arguments to functions?
QUESTION_TEXT
Wmlscript_function() function does not take any arguments.
Addition ( ) takes two numbers as its arguments:
Extern function addition(number 1, number 2)
{
WMLBrowser.setVaar(“ message”,number1+number2);
}
To call addition ( ) from a WML card , we need to include 2 arguments
in the URL
Ex:
<a href=”wmlscript.wmls#addition(10,11)”>execute Script</a>
SCHEME OF
EVALUATION
Addition( ) function:
<card id=”card1”title=”WMLScript”>
<onevent type=”onenterforward”>
<refresh>
<setvar name=”wmlVar1” value=”10”/>
<setvar name=”wmlVar2” value=”11”/>
</refresh>
</onevent>
<p>
<a href=”wmlscript.wmls#addition($(wmlVar1),$(wmlVar2))”>execute
Script</a>
</p>
…
</card>
QUESTION_TYPE DESCRIPTIVE_QUESTION
QUESTION_ID
118692
QUESTION_TEXT
Discuss the usage of comments & line breaking with an example in
WML.
Comments in WML: comments are placed inside <!-- --> in WML this
is the same as HTML
Ex: <!_ _ this is a comment in WML _ _ > 1mark
<! _ _ this is a multi line comment_ _>
2marks
Line breaking in WML: <br/> is the line breaking tag in WML, which
is same as that in HTML 1 mark
Example:
SCHEME OF
EVALUATION
<?xml version = “1.0”?>
<!DOCTYPE wml PUBLIC “-//WAPFORUM//DTD WML 1.3 // EN “
http://www.wapforum.org/wm113.dtd>
<wml>
<card id = “card1” title = “lme break”>
<p>
Before br <br/>after br
</p>
</card>
</wml>
marks
QUESTION_TYPE
DESCRIPTIVE_QUESTION
QUESTION_ID
155771
QUESTION_TEXT
Why HTTP, TLS and Transmission Control Protocol (TCP) are
inefficient over mobile networks.
SCHEME OF
EVALUATION
6
HTML, HTTP, TLS and transmission control protocol (TCP) are
inefficient over mobile networks because they require large amount of
mainly text-based data to be sent over a network.this requirement for
large amounts of data to be transmitted is not optimal for mobile
networks because mobile networks currently are characterized by lower
bandwidths then normal web networks. In addition, any protocols with
large data transmission requirement must overcome the difficult
challenges of intermittent coverage, another Characteristic of wireless
networks.
HTML Internet standards are not optimal for the wireless web because
this standard was not designed for small screen displays and limited
input options. WAP does not use HTML to display web sites, but instead
uses WML and the WMLScript. WML and WMLScript make optimum
use of small display screens where navigation is usually performed with
one hand. WAP standards are scalable and can fit into the two-line text
displays on the most basic devices to the full graphic screens on the
latest smart phones.
Download