Lecture # 1 MAD Intro
Lecture # 1 MAD Intro
Development
LECTURE # 1
The Course
Course Code: CS4-Morning
Course Title: Mobile Application Development
Instructor: MUHAMMAD AWAIS
Semester: 4
Duration: 16 Weeks
Grading
Following is the division of marks:
• Start Talking
• Start Talking
• A few games
Featured Mobile Phones
• Camera
• Check Emails
Smart Phones
• Calls, SMS, Games
• Camera
• Use Internet on Mobile Phone
• Check Emails
• Enjoy Music
• Watch Videos
• Use Social Networks
• Maps
• Read Books
• Do almost everything that can be done on a Computer.
LECTURE CONTENTS
•Introduction with JVM and programming environment
•Variables, arrays & maps
•If Statements
•Loops
•Classes and objects
What is JVM
•JVM (Java Virtual Machine) is an abstract machine. It is a specification
that provides runtime environment in which java bytecode can be
executed.
•Virtual machine is a software simulation of machine which can perform
operations similar to physical machine.
•JVMs are available for many hardware and software platforms (i.e. JVM
is platform dependent).
•Virtual machine is not physically present.
•E.g calculator
What it Does
•Loads code
•Verifies code
•Exécutes code
•Provides runtime environment
JVM Architecture
Programming Environment
•“A Programming Environment is the collection of tools used in the
development of software.”
•In a general sense, a programming environment combines hardware
and software that allows a developer to build applications.
•An Integrated Development Environment integrates common
development tools in single software environment.
•E.g for java programming IDE is Android Studio.
Variables
•Variables are containers for storing data values.
•E.g String, int, Float, Char, Boolean
•int num = 5;
•float myfloatnum = 5.9;
•char myletter = ‘D’;
•boolean mybool = true;
•String mytext = “Hello”;
Arrays
•Arrays are used to store multiple values in a single variable, instead of
declaring separate variables for each value.
•Syntax:
•public interface Map<k, v >
Map code example
public class test{
public static void main( String args[ ] ) Methods:
{
• Clear( );
Map map = new HashMap( ); • containsKey(Object) //boolean value
map.put( 1, “Ali” ); • containsValue(Object)//boolean
map.put( 2, “Ahmad” );
map.put( 3, “Ahasn” );
system.out.println(map);
}
}
Output: { 1=Ali, 2= Ahmad, 3=Ahsan}
If Statements
•Use the if statement to specify a block of java code to be executed if the
condition is true.
•E.g.
•Everything in Java is associated with classes and objects, along with its
attributes and methods.
•For example: in real life, a car is an object. The car has attributes, such
as weight and color, and methods, such as drive and brake.
Example
public class Main {
int x = 5;
World’s Population
Is Around
7 Billion
Why Develop for Mobile?
Around
7 Billion
1 Billion +
Mobile Users
Smart Phone Users
6 Billion
Market share
◦ No. of Users
Development environment
◦ Licensing
Ease of Development
◦ Programming Language
Freedom of Development
Why Develop for Mobile?
Mobile Application Development
iOS Android
Mobile Development
Apple Android
Language Objective C Java
License $99 / year $ 25 for Life Time
Open Source No Yes
Hardware Only Apple machines Any Machine
Publication Have to Pass Apple With Ease
Publication System