0% found this document useful (0 votes)
23 views

Laboratory Manual Wireless Communication

Uploaded by

soumen maity
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)
23 views

Laboratory Manual Wireless Communication

Uploaded by

soumen maity
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/ 15

Laboratory Manual

For

Wireless Communication and Mobile


Programming (170702N)

B.E. (COMPUTER)
SEM VII

July 2012

Shree Swami Atmanand Saraswati Institute of Technology


Shree Swami Atmanand Vidya Sankul,
Kapodra, Varachha Road,
Surat – 395006
www.ssasit.org
Table of Contents
EXPERIMENT-1
Write a WML program to display title.

EXPERIMENT-2
Write a WML program to call two cards from same deck.

EXPERIMENT-3
Write a WML program to call second deck from first deck.

EXPERIMENT-4
Write a WML program to display table.

EXPERIMENT-5
Write a WML program to display user personal information.

EXPERIMENT-6
Write a WML program for option group.

EXPERIMENT-7
Introduction to WML events & WML scripts.

EXPERIMENT-8
Introduction to WML function.

EXPERIMENT-9
Design a calculator using WML Script.

EXPERIMENT-10
Design a mobile phone book using WML Script.

EXPERIMENT-11
Introduction to J2ME
(I) Create HELLO WORLD application in J2ME.
(II) Study of MIDLET life cycle.

EXPERIMENT-12
Study and Demostration of User interface in J2ME.

~2~
Basic WML Tags:-
 Card: This tag helps the user to create a card which acts as a canvas on which the user works
for the application creation.
 P: This tag helps the user to write in the canvas of the card that the user is using for creating
the application.
 Br: This tag is used to end the line.
 B: This tag enables the text to be bold.
 Do: This tag helps the user to create the options in the available options tab of the simulator
and creates a new link.
 Input: This enables developers to create a place in applications for users to enter data.
 Select: The select element enables you to create a list of options for user selections.
 Option: The option element contains a few attributes that can enhance the options list.
 Img: The image tag allows the user to add an image on the Canvas i.e. the card he is working
on the application.
 Optgroup : This tag allows the user to add the check boxes in the form of a group to the
application.
 Go: This tag helps the user to pass on control to the valid link after the anchor tag has been
invoked.
Functions:-
 Extern keyword: By making a function extern we make it accessible globally.
 getVar(String) : Retrieves the contents of a browser variable.
 setVar(String1,String2) : Sets a browser variable.
 Refresh( ) : Specifies a WML <refresh> task.
 Lang.Random( range) : Generates a random integer number. The range of the
number is from zero to the number defined in the function’s argument.
 Dialogs.Alert( String ) : It is used to display warning message to user.

~3~
EXPERIMENT – 1
AIM:Write a WML program to display title.
LOGIC:

1.You have to change the card id and title.


2.Write the code in between card of dack.

OUTPUT:

~4~
EXPERIMENT – 2
AIM: Write a WML program to call two cards from same deck.
LOGIC:

1.You have to change the card id and title.


2.Write the code in between card of dack.
3.Write <do> and <href> tags to go to the next card.

OUTPUT:

~5~
EXPERIMENT – 3
AIM: Write a WML program to call two cards from same deck.
LOGIC:

1.You have to change the card id and title.


2.Write the code in between card of dack.
3.Write <do> and <href> tags to go to the next card.
4.Use <a> tag to go back to first dack

OUTPUT:

~6~
EXPERIMENT – 4
AIM: Write a WML program to display table.

LOGIC:

1.You have to change the card id and title.


2.Write the code in between card of dack.
3.Use <table> tag to create table.
4.Use <td> and <tr> tags as used in HTML.

OUTPUT:

~7~
EXPERIMENT – 5
AIM:Write a WML program to display user personal information.
LOGIC:

1.You have to change the card id and title.


2.Write the code in between card of deck.
3.Use <input> tag to enter data.
4.Use $ sign with the data name which you want to print.

OUTPUT:

~8~
EXPERIMENT – 6
AIM: Write a WML program for option group.
LOGIC:

1.You have to change the card id and title.


2.Write the code in between card of deck.
3.Use <select> tag to enter options.
4.Use <option> tag and add the value name and onpick attributes..

OUTPUT:

~9~
EXPERIMENT – 7

AIM: Introduction to WML events & WML scripts.

WML <onenterbackward> Event

This event occurs when the user hits a card by normal backward navigational means. That is,
user presses the Back key on a later card and arrives back at this card in the history stack.x

Here is the syntax to define an event handler for onenterbackward event:

<onevent type="onenterbackward">
A task to be performed.</onevent>

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Now use onenterbackword event so you can go back to previous card.

OUTPUT:

~ 10 ~
WML <onenterforward> Event

The onenterforward event will be useful to you if you want to do something before a card is
displayed. For example, you need the onenterforward event if you want to assign a value to a
variable before a card is displayed.

Here is the syntax to define an event handler for onenterforward event:

<onevent type="onenterforward">
A task to be performed.
</onevent>

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Now use onenterforword event so you can go to a card in forward direction.

WML <onpick> Attribute

The onpick attribute is a great shortcut if you are using a select menu. Instead of writing a lot
of code that allows the user to go to another card if an option is selected, you can simply
place the destination into the onpick attribute. Here is a code fragment without the onpick
attribute:

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Now use onpick to select element from menu.

OUTPUT:

~ 11 ~
WML <ontimer> Event

The ontimer event is used to trigger an event after a given time period. Let's say you want to
display a message after 5 seconds of loading a card then you can use this event to do so.

Here is the syntax to define an event handler for ontimer event:

<onevent type="ontimer">
A task to be performed.
</onevent>
<timer value="50"/>

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Now use ontimer event to display message after define time period.
OUTPUT:

~ 12 ~
EXPERIMENT – 8
AIM: Introduction to WML function.

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Create function Helloworld() and call it in your WML file.
For example:

<a href = “Abc.wml#Helloworld()” title=”SHOW”></a>

OUTPUT:

~ 13 ~
PRACTICAL -9

Aim: - Design a calculator using WML Script.

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Use text box to enter values of variables and <option> tag to select different
operation like add, multiply etc.

OUTPUT:

~ 14 ~
PRACTICAL -10

AIM: Design a mobile phone book using WML Script.

LOGIC:

1. You have to change the card id and title.


2.Write the code in between card of deck.
3.Use text boxes to enter user name and phone number.
4.Display the detail in new card.

OUTPUT:

~ 15 ~

You might also like