Experiment No 6 Display Calculator Using WML: Theory
Experiment No 6 Display Calculator Using WML: Theory
Experiment No 6 Display Calculator Using WML: Theory
Part A
Aim: Write a program using WML to display calculator and calendar
for android phone.
Theory:
HTML VS WML
3) To run the wml file double click the file, or do right click and
open with winwap browser and enter complete path of wml
file in address bar.
4) To run wml file on Winwap smartphone browser Emulator, follow the
given steps
WML code
Calc.wml
<?xml version="1.0"?>
<wml>
<p>
<option value="ADD">Addition</option>
<option value="SUB">Subtraction</option>
<option value="MULT">Multiplication</option>
<option value="DIV">Division</option>
</select>
<go href="calc.wmls#operation('answer',$(amount1),'$
(operator)',$(amount2))"/>
</do>
</p>
</card>
</wml>
Calc.wmls
{ var ans=0;
if (operate=='ADD')
else if (operate=='SUB')
ans=val1 - val2;
else if (operate=='MULT')
ans=val1 * val2;
else
ans=val1 / val2;
WMLBrowser.setVar(result,ans);
WMLBrowser.refresh();
}
PART B
(PART B: TO BE COMPLETED BY STUDENTS)
(Students must submit the soft copy as per following segments within two
hours of the practical. The soft copy must be uploaded on the Blackboard
or emailed to the concerned lab in charge faculties at the end of the
practical in case the there is no Black board access available)
Class Batch:
Grade:
(Paste your output that you are getting after running app in
from of screen shots and attach report after running
experiment)
B.4 Conclusion:
B.5Question of Curiosity