Mobile Computing

advertisement
Jawaharlal Nehru Engineering College Laboratory Manual
MOBILE COMPUTING
For
MCA Students
16, Oct 2003 – Rev 00 – Comp Sc – ISO 9000 Tech Document
Ó Author JNEC, Aurangabad
FORWARD
It is my great pleasure to present this laboratory manual for Final year
mca students for the subject of Mobile Computing keeping in view the
vast coverage required for visualization of concepts of Mobile Scripts
using WML with examples.
As a student, many of you may be wondering with some of the questions
in your mind regarding the subject and exactly what has been tried is to
answer through this manual.
As you may be aware that MGM has already been awarded with ISO
9000 certification and it is our endure to technically equip our students
taking the advantage of the procedural aspects of ISO 9000 Certification.
Faculty members are also advised that covering these aspects in initial
stage itself, will greatly relived them in future as much of the load will be
taken care by the enthusiasm energies of the students once they are
conceptually clear.
Dr. Sudhir Deshmukh
Principal
LABORATORY MANNUAL CONTENTS
This manual is intended for the Final year students of MCA branch in
the subject of Mobile Computing. This manual typically contains
practical/Lab Sessions related Mobile Computing covering various
aspects related the subject to enhanced understanding.
Although, as per the syllabus, WML programs are prescribed, we have
made the efforts to cover various aspects of Mobile Computing and
communication.
Students are advised to thoroughly go through this manual rather than
only topics mentioned in the syllabus as practical aspects are the key to
understanding and conceptual visualization of theoretical aspects
covered in the books.
Good Luck for your Enjoyable Laboratory Sessions
S.N.Deshmukh
MCA Department
SUBJECT INDEX
1.
Introduction to Wireless Application Protocol.
2.
Study of Nokia WAP Tool Kit.
3.
Study structure of WML and basic tags in WML
4.
Study of Anchor tag and program for College intake status.
5.
Study of Template, use input formats and program for online shopping
6.
Study of WML Script and program for online quiz.
7.
Study of WML String functions and program for checking validity of Credit
Card
8.
Study of ASP with WML.
DO‛s and Don‛ts in Laboratory:
1. Do not handle any equipment before reading the instructions/Instruction
manuals
2. Read carefully the power ratings of the equipment before it is switched on
whether
Ratings 230 V/50 Hz or 115V/60 Hz. For Indian equipments, the power ratings
are
Normally 230V/50Hz. If You have equipment with 115/60 Hz ratings, do not
insert
Power plug, as our normal supply is 230V/50 Hz, which will damage the equipment.
3. Observe type of sockets of equipment power to avoid mechanical damage
4. Do not forcefully place connectors to avoid the damage
5. Strictly observe the instructions given by the teacher/Lab Instructor
Instruction for Laboratory Teachers::
1. Submission related to whatever lab work has been completed should be done
during the next lab session. The immediate arrangements for printouts related to
submission on the day of practical assignments.
2. Students should be taught for taking the printouts under the observation of lab
teacher.
3. The promptness of submission should be encouraged by way of marking and
evaluation patterns that will benefit the sincere students.
1. LAB EXCERCISES:
[Purpose these exercises is to make familiar the students to Wireless Application Protocol.
Exercise No1: ( 2 Hours) – 1 Practical
A] Study of WAP
­ WAP Architecture
­ WAP Stack
­ WML
2. Lab Exercises:
[Purpose of these exercises to make familiar students to Nokia WAP Toolkit]
Exercise No2: ( 2 Hours) – 1 Practical
A] What is Nokia WAP Toolkit and Types of toolkits?
B] Requirements of Nokia WAP Toolkit.
C] Tabs in Nokia WAP Toolkit.
3. Lab Exercises:
[Before these exercises, students should be well conversant for using WML program
development environment and handling Nokia WAP Toolkit. These Exercises require basic
knowledge regarding concepts like structured programming, modular programming.
Exercise No3: ( 2 Hours) – 1 Practicals
[Purpose of these exercises to make familiar students with the structure of WML and basic
tags in WML ]
A] Study of Structure of WML Programs.
B] Use of header part.
C] Write simple program covering all basic tags and attributes
(Paragraph tag, bold tag, strong tag, etc..)
Example:
Structure of WML Programs.
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML
1.1//EN" "http://www.wapforum.org/DTD/ wml_1.1.xml">
<wml>
<card id=" " title=" ">
<p>
-------
</p>
</card>
</wml> 4. Lab Exercises:
[Purpose of this exercise is to Study of Anchor tag ,image tag and write a program for
College intake status.]
Exercise No 4: ( 2 Hours) – 1 Practicals
A] study of Anchor tag and Image tag.
Description of anchor tag
-go
-prev
-refresh
Attributes of the anchor element
-Title= vdata
-xml:lang., id ,Class Common attributes
Syntax of anchor tag
<a href=”#source card name”>
Description of Image tag.
Syntax <img src=”filename”>
Attributes
Alt=vdata
Src=href
localsrc=vdata
vspace=length hspace=length
align=(top|middle|bottom
B] Write a program for Engineering College intake status.
The program should consist of details of ,No. of colleges in a particular university
,No. of departments in the respective colleges ,no. of seats available in respective
departments and so on . 5. Lab Exercises: Exercise No 5: ( 2 Hours) – 1 Practicals
Study of Template, use input formats and program for online shopping
A]Study of Template
¨ Description of Template
-do
-onevent
¨Syntax of Template
<template>
<do type="prev" label="Previous">
<prev/>
</do>
</template>
¨Attributes of Template
onenterforward=href
onenterbackward=href
ontimer=href
B]Write a program for online shopping using Select option,group ,setvar etc.. 6. Lab Exercises:
[Purpose of these exercises to study WML Script and Write a program for Online Quiz]
Exercise No 6: ( 2 Hours) – 1 Practicals
A]Study WML Script & write a program for online Quiz
WML Script:
Benefits of using WMLScript
Functions
External functions
Declaration of Functions
Parameter passing
Input handling
B] Write a program for Online Quiz 7. Lab Exercises:
[Purpose of these exercises to study WML String functions and Write a program for
Checking validity of Credit card]
Exercise No 7: ( 2 Hours) – 1 Practicals
Study WML String functions & Write a program for checking validity of a Credit-card
A]WML String Functions:
Length
Function: length(string)
Example:
var a="ABC";
var b=String.length(a); // b=3
var c=String.length(""); // c=0
var d=String.length(342); // d=3
isEmpty
Function:
isEmpty(string)
Example:
var a="Hello";
var b="";
var c=String.isEmpty(a); // c=false
var d=String.isEmpty(b); // d=true
var e=String.isEmpty(true); // e=false
charAt
Function:
charAt(string, index)
Example:
var a="My name is Joe";
var b=String.charAt(a, 0); // b="M"
var c=String.charAt(a, 100); // c=""
var d=String.charAt(34, 0); // d="3"
var e=String.charAt(a, "first") // e=invalid
subString
Function:
subString(string, startIndex, length)
Example:
var a="ABCD";
var b=String.subString(a, 1, 2); // b="BC"
var c=String.subString(a, 2, 5); // c="CD"
var d=String.subString(1234, 0, 2); // d="12"
find
Function: find(string, subString)
Example:
var a="abcde";
var b=String.find(a, "cd"); // b=2
var c=String.find(34.2, "de");// c=-1
var d=String.find(a, "gz"); // d=-1
var e=String.find(34, "3"); // e=0
trim
trim(string)
Example:
var a="Hello";
var b=" Bye Jon . See you! ";
var c=String.trim(a); // c="Hello"
var d=String.trim(b); // d="Bye Jon . See you!"
B]Write a program for Credit Card.
A program should accept a credit card no. and check whether it‛s a valid credit card.
8. Lab Exercises: Exercise No 8: ( 2 Hours) – 1 Practicals
Study of ASP with WML.
Write code for connecting ASP and WML.
Program Listings for Reference: 4. Quiz on the subject: Quiz should be conducted on tips in the laboratory, recent trends and subject knowledge of
the subject. The quiz questions should be formulated such that questions are normally are
from the scope outside of the books. However twisted questions and self formulated
questions by the faculty can be asked but correctness of it is necessarily to be thoroughly
checked before the conduction of the quiz. 5. Conduction of Viva­Voce Examinations: Teacher should oral exams of the students with full preparation. Normally, the objective
questions with guess are to be avoided. To make it meaningful, the questions should be such
that depth of the students in the subject is tested Oral examinations are to be conducted
in co-cordial environment amongst the teachers taking the examination. Teachers taking
such examinations should not have ill thoughts about each other and courtesies should be
offered to each other in case of difference of opinion, which should be critically suppressed
in front of the students.
6. Submission: Document Standard:
A] Page Size
A4 Size
B] Running text
Justified text
C] Spacing
1 Line
D] Page Layout and Margins (Dimensions in Cms)
Normal Page
Horizantal
2.0
2.5
2.0
2.5
2.0
2.0
0.7”
0.7”
2.0
2.0
Desription
College Name
Document Title
Document Subject
Class
Document No
Copy write inf
Forward heading
Forward matter
Lab man Contents title
Index title
Index contents
Heading
Running Matter
Font
Arial
Tahoma
Century Gothic
Bookman old Slyle
Bookman old Slyle
Bookman old Slyle
Bookman old Slyle
Bookman old Slyle
Bookman old Slyle
Bookman old Slyle
Bookman old Slyle
Tahoma
Comic Sans MS
Size
24
22
14
12
10
9
12
12
12
12
12
14
10
Boldness
------------------------------------Yes
----Yes
-----
Italics
-------------------------------------------------------Yes
------
Underline
Yes
----------------------------------------Yes
--------Yes
Yes
--------Yes
---------
Capitalize
------------------Capital
---------------------------Capital
---------Capital
Capital
----------------------------
7. Evaluation and marking system: Basic honesty in the evaluation and marking system is absolutely essential and in the process
impartial nature of the evaluator is required in the examination system to become popular
amongst the students. It is a wrong approach or concept to award the students by way of
easy marking to get cheap popularity among the students to which they do not deserve. It is
a primary responsibility of the teacher that right students who are really putting up lot of
hard work with right kind of intelligence are correctly awarded.
The marking patterns should be justifiable to the students without any ambiguity and
teacher should see that students are faced with unjust circumstances.
Download