INFORMATION
TECHNOLOGY
CLASS XII
Subject code(802)
CONTENTS
1. OPERATING WEB.
2. ONLINE RESERVATION SYSTEMS.
3. ADVANTAGES OF ONLINE RESERVATION SYSTEM.
4. PRECAUTIONS WHILE PERFORMING ONLINE TRANSACTIONS.
5. CASE STUDY - BOOK RAIL TICKET.
6. E-GOVERNANCE.
7. E-GOVERNANCE SITES.
8. HOW DOES ONLINE SHOPPING WORKS?
9. ONLINE COURSES, TUTORIALS AND TESTS.
10. PROJECT MANAGEMENT.
11. CASE STUDY - ONLINE GAME, ONLINE QUIZ.
12. CASE STUDY - ONLINE BILL CALCULATOR.
CONTENTS
1. TYPES OF PROGRAMMING LANGUAGE
2. HIGH LEVEL LANGUAGE
3. OBJECT ORIENTED & PROCEDURAL LANGUAGE
4. LOW LEVEL LANGUAGE
5. ASSEMBLY LANGUAGE
6. MACHINE LANGUAGE
7. COMPILER AND INTERPRETER
8. PLATFORM INDEPENDENCE
9. JAVA BYTECODE
10. JAVA VIRTUAL MACHINE (JVM)
11. JAVA INTEGRATED DEVELOPMENT ENVIRONMENT(IDE)
TYPES OF PROGRAMMING LANGUAGE
PROGRAMMER
HIGH LEVEL
LOW LEVEL
HARDWARE
HIGH LEVEL
PROGRAMMER
OBJECT ORIENTED
PROCEDURAL
HIGH LEVEL
LOW LEVEL LOW LEVEL
ASSEMBLY LANGUAGE
HARDWARE MACHINE LANGUAGE
To write a Java program, you will need a Text
Editor (for writing the code) and a Java compiler
(for compiling the code into bytecode).
There are a wide variety of Java Integrated
Development Environments (IDEs) available in
the market that come equipped with a text editor
and a Java compiler thus simplifying writing,
compiling and executing Java programs.
Most of them are freely downloadable from the
Internet. We will be using the open source and
free Java Net Beans IDE for writing Java programs.
A multi line comment /*
Package helloworld */
contains the file
[Link]
class declaration
Name of the class must
match the source code
file name
A single comment //
Notice that as you type the
dot after the word System
NetBeans will display
a list of available options.
you can scroll down the
displayed list to reach the
word out and then either
double click or press enter.
Output from Helloworld program.
Click on New File
[Link]
created in the package
helloworld
DATA TYPES
Output : Press Shift + F6
Output : Press Shift + F6
Output : Press Shift + F6
public static void main(String[] args)
static void main()
public • A class need an object
• No return type.
• Interpreter do not
• JVM will call the
main() first.
• INTERPRETER have
to be created. expect any return
type. the instruction
• Without creating an
• Visibility Mode from JVM to call
object for a class, a • Northing is passed
• Public is a keyword the main method
function within a class to JVM. first.
where class/function
cannot be called.
can be accessed
anywhere within the • To overcome this,
program. static method can be String[] args
• During Java runtime invoked even without • String arguments.
(different path) public creating an object of a • Gets the command line arguments to
is accessible. class.
process the program during runtime.
String Variables
A variable of the primitive data type char can be used to store a single character. To assign a value to a char
variable we enclose the character between single quotes.
char middle_name = 'M’; For char datatype - Single quote
To store more than one character, we use the String class in Java.
To assign a text value to a String variable we enclose the text between double quotes.
For example,
String first_name = "Mayank";
String last_name = "Saxena"; For String datatype – Double quote
To print char or String variables, we can use the [Link]()method.
[Link](first_name+" "+ middle_name+" "+last_name);
The output from the statement given above is:
Mayank M Saxena
the + operator concatenates the strings together
1. Variable names can begin with either an alphabetic character, an underscore
(_), or a dollar sign ($). However, convention is to begin a variable name with a
letter. They can consist of only alphabets, digits, and underscore.
2. Variable names must be one word. Spaces are not allowed in variable names.
Underscores are allowed. “total_marks” is fine but “total marks” is not.
3. There are some reserved words in Java that cannot be used as variable names,
for example - int.
4. Java is a case-sensitive language. For example, the variable name “percentage”
differs from the variable name “PERCENTAGE” or “Percentage”.
5. It is good practice to make variable names meaningful. The name
should indicate the use of that variable.
6. You can define multiple variables of the same type in one statement by
separating each with a comma. For example, you can define three integer
variables as shown: int num1, num2, num3;
OPERATORS
Arithmetic Relational Assignment Logical
Operators Operators Operators Operators
+, -, *, /, <, <=, >,>= =, +=, -=,
&&, ||, !
%, ++, -- ==, != *=, /=, %=
(int a = 20, b = 30) (int a = 20, b = 30) (int a = 20, b = 30) (int a = 20, b = 30)
a++ 21 a-- 19 a==b false a/=b 0 a&&b false
a%b 10 a!=b true a%=b 20 a||b true !a false
THANK YOU!!!