Professional Documents
Culture Documents
Unit 1
Unit 1
Uses of internet
Internet in 1950’s
Internet in 1960’s
The first step in the web development process for a developer is to make a strategy
for developing a web page or website. In the strategy phase, a web developer has to
do the following:
2. Developing team
3. Make the appropriate analysis associated with the problem and review the analysis
After the strategy-making, the next step in the web development process is to develop a
planned work. Web developer has to determine the schedule and the specifications.
The tasks in this phase are as follows –
1. Developing approach
2. Planning of contents needed for use
3. Making of rough design for the project
4. Making of final design from rough design, if there are no considerable
modifications in rough design.
5. Frame a prototype of the project for developing
6. Test the prototype
Production of the desired result:
In this phase of the web development process, the actual functional site is built.
1. After the proper testing of the prototype, the developer has to work on developing
the actual live web project.
2. The actual live web project is built according to the requirements of the client.
3. Web developer has to consider all the situations from the design phase to create all
the features in the web project.
4. This phase involves both front-end development and back-end development of the
website.
Online shopping website
Prototype
user Select products Add products Make online Invoice
into the cart payment generated
By net banking
Make online
payment
By credit/debit card
Contd …
Front-end development comprises the writing codes with the basic technologies like
HTML, CSS, etc. according to the web standards. It generally starts by developing the
home page first and then other pages.
Back-end development is also completed in this phase by installing and configuring the
content management systems, databases, and frameworks.
Testing and Maintenance:
Testing is an important phase in the web development process. Testing is performed by
the developers and testers to ensure the client’s requirements after completion of the
web project.
In this phase, quality assurance and browser compatibility issues of the website are
checked. Testers test all the developed features and assure the validity of the written
code.
Regression testing
Load Testing
To find out the total count of users that can access the application at the same time.
To determine the scalability of the application.
Manual testing
Automatic testing
Registration with ISP:
The next step or phase is to register the web project with the regional
ISP to make the web project legal.
The web project is delivered to the client after uploading the website
to a server.
The client has to select and decide the ISP which provides domain
name registration and web hosting services.
Core Java
Procedural Programming –
A sample program in C -
1. # include <stdio.h>
2. # include <conio.h>
3. Void main()
4. {
5. int x=10;
6. int y = 20;
7. int total = x+y;
8. printf(“%d”, total);
9. }
JDK
Java can be used to develop virtually any kind of
software applications like games that can run on PCs and
Mobiles, Desktop Applications, Web Applications,
Embedded Applications (for example applications that
can run in a watch or a pen), etc.
Windows ---
Int x= 10
Int y=20
Int sum = x+y ----- 1
Machine code ADD R1, M[x], M[y] -- Byte code -- .class file
1001 11 FF BB -- processor - instruct - add operation
Linux machine installed JRE - Java virtual machine
ADD – 11001 ADD R1, M[x], M[y] - not able to perform addition
Command – java --- JDK – tool (java interpreter) - activate - JVM - ADD - 11001
Platform independence feature – portability 22
Object Oriented Programming –
Key concepts –
1. Encapsulation
2. Polymorphism
3. Inheritance
4. Abstraction
Class A
{
}
Definition –
A class contains properties in the form of member variables and member methods.
int Add()
{
int sum = x + y; function/ member method It contains the properties
return sum; of a class. For object
} “ob”
} value of x = 10 and
value of y = 20.
class Use1
{ Access specifier
public static void main(String args[])
Keyword
reference {
variable A ob = new A() ; Object
int output = ob. Add ();
System.out.println (“sum = “ + output );
}
}
Use dot operator to access properties of a class package
A ob = new A();
class
ob . X
ob . Y concatenate operator
ob. Add() method
System.out.println(“Sum = “ + output);
Int x = 10;
Int y = 20;
class A { class B {
int a = 10; public static void main(String args[] )
} {
Instance variable
A ob1 = new A();
System.out.println(ob1.a); 10
ob1.a = 20;
a = 10
Object – ob1 a = 20 System.out.println(ob1.a); 20
(separate memory) A ob2 = new A();
System.out.println(ob2.a); 10
Object – ob2 a = 10 }
(separate memory) }
Class / static variable concept
class A {
static int a = 10;
}
Object – ob1
class B {
a = 10 public static void main(String args[] )
(shared memory) {
Object – ob2 A ob1 = new A();
System.out.println(ob1.a); 10
ob1.a = 20;
System.out.println(ob1.a); 20
A ob2 = new A();
System.out.println(ob2.a); 20
}
}
Class / static variable concept
class A {
Static variables can be accessed by class name also.
static int a = 10;
}
class B {
public static void main(String args[] )
{
System.out.println (A.a);
A.a = 20;
System.out.println(A.a);
}
}
Class / static variable concept contd .. class A {
int a = 10 , b = 20;
static int Add() {
int sum = a + b; }
}
class B {
public static void main(String args[] )
{
System.out.println (“Sum = “ + A.Add());
}
}
byte a = 8;
int x = a + 20;
int a = 10;
byte x = a + 20; // error: not able to convert from lower range
data type to higher range data type
The below statement declares two short variables x and y initialized to 3 and 4 respectively.
short x = 3, y = 4;
short total = x + y;
However, when we try to perform an addition operation, such as given below,
we get a compilation error: Type mismatch: cannot convert from int to short.
Since x and y are of type short, they both are automatically widened to int, and the resultant int is
being assigned to sum which is of type short.
The compile-time error occurs while assigning the result which happens to be an int. To fix it, we will
have to explicitly typecast the result to a short, as shown below.
Operator Description
+ Used for addition and string
concatenation
Operator Description
== Checks if two values are equal
Operator Description
+ Unary Plus, used for indicating a positive value
Operator Description
! this is a unary operator and returns true when the condition under consideration is
not satisfied or is a false condition.
a = 10, b = 20
!(a<b) // returns false
Operator Description
Bitwise OR (|) This operator is a binary operator, denoted by ‘|’. It returns bit by bit OR
of input values.
a = 5 = 0101 (In Binary)
b = 7 = 0111 (In Binary)
Bitwise OR Operation of 5 and 7
0101 | 0111 = 0111 = 7 (In decimal)
Bitwise AND (&) This operator is a binary operator, denoted by ‘&.’ It returns bit by bit
AND of input values.
a = 5 = 0101 (In Binary)
b = 7 = 0111 (In Binary)
Bitwise AND Operation of 5 and 7
0101 & 0111 = 0101 = 5 (In decimal)
Bitwise operator
Operator Description
Bitwise XOR (^) This operator is a binary operator, denoted by ‘^.’ It returns bit by bit
XOR of input values.
a = 5 = 0101 (In Binary)
b = 7 = 0111 (In Binary)
Bitwise XOR Operation of 5 and 7
0101 ^ 0111 = 0010 = 2 (In decimal)
Bitwise Complement This operator is a unary operator, denoted by ‘~.’ It returns the one’s
(~) complement representation of the input value.
a = 5 = 0101 (In Binary)
Bitwise Complement Operation of 5 ~ 0101 = 1010 = 10 (In decimal)
Shift operator
Operator Description
Signed Left Shift (<<) The left shift operator moves all bits by a given number of bits to
the left.
int number = 2;
// 2 bit left shift operation
int Ans = number << 2;
Ans = 8
The right shift operator moves all bits by a given number of bits to
the right.
int number = 8;
// 2 bit signed right shift
int Ans = number >> 2;
Ans = 2
Java ternary operator is the only conditional operator that takes three operands. It’s a
one-liner replacement for if-then-else statement and used a lot in Java programming.
num1 = 10;
num2 = 20;
res=(num1>num2) ? (num1+num2):(num1-num2)