Hhtmlnote
Hhtmlnote
1. Concept of C:-
• C is a high level language.
• DevC
• Netbeans
• Visual studio……etc.
3. What is compiler:-
Compiler is an application that is used to convert Source code into Machine code.
Diagram of compiler:-
Machine code
Source code
.c/.cpp
Compiler:-
4. Header Files:-
Header files are also known as library files. It contains pre-define functions the extension
of header file is .h.
Example: stdio.h, conio.h, graphics.h, math.h, windows.h, string.h...........etc.
Note: - Into TurboC++ compiler header files are saved into includes folder.
5. Keywords:-
Keywords are reserve words. The meaning of keywords is pre define into the compiler.
[IPO]
Example: scanf(),gets(),getch(),getchar(),getche().........etc
• output method:
Program 1
Save file name:-pro1.c
#include<stdio.h>
#include<conio.h>
void main ()
clrscr();
printf(“Welcome to C Programming Language”);
getch();
Explanation of Program1
#include<stdio.h>
#: Pre-processor directive (means link).
void: void is a keyword and data type but it is empty data type.
main (): main is a user defined built-in function.
Variables:-
Variables are memory place holder. The value of variable can be changed during the
program execution.
Rules for variable declaration:
Example:-
int a; //valid
int a b; / /invalid
Example:-
int 1a; //invalid
Example:-
Low level language: - Low level language is not human readable language its mean it is
display in binary format.
Date: 19/10/2020
Operators in C language:-
Operators are use to performs the operations between operands.
Example:-
x+y;
Types of Operators:-
There are many types of operator -
• Arithmetic Operator
• Logical Operator
• Relational Operator
• Conditional Operator
• Bitwise Operator
• Increment/Decrement Operator or Unary/Binary Operator……etc.
• Arithmetic Operator:-
• + plus operator
• – minus operator
• Logical Operator:-
• ! NOT operator
• Relational Operator:-
Relational operator is used to represent the relation between two entities.
• Conditional Operator:-
Example:-
(a>b)? a: b;
Example:-
Int x; int y;
x=2; y=2;
x++; => x=x+1; y--; //y=y-1;
Date – 6/11/2020
6 Bitwise operator:-
The bitwise operators are the operators used to perform the operations on the
data at the bit-level.
Performance:-
Data type is used to define the type of data. There are two types of data type-
Example:
Example:
Statement:-
Statement is block that is executed by compiler.
Types of statement:-
Control statement:-
The statement that is used to check the conditions that are conditional statement or
decision making statement.
• if statement
• switch statement
• if statement:-
• simple if
• if else
• nested if
• Simple if:-
Syntax:-
if (condition)
{
//block of code
• if else:-
if given condition is true then true block of code will be executed otherwise else
block of code will be executed.
Types of if statement:-
• Simple if
• If else
• else if//ladder if
• Nested if
if(condition)
{
//block of code
• Syntax of if else :-
if(condition)
{
//block of code //true block
}
else
• Nested if statement:-
if(condition)
if(condition)
{
//block of code
else
//block of code
}
else
//block of code
• else if:-
Syntax:-
if(condition1)//true block
{
//block of code
//block of code
//block of code
}
else
• break statement
• continue statement
• goto statement
• break statement:-
Syntax:-
break;
#include<stdio.h>
#include<conio.h>
void main()
int i;
clrscr();
printf(“Display Number\n”);
for(i=1;i<=10;i++)
if (i==7)
Break;
}
printf(“%d\t”, i);
getch();
2 continue statement:-
It is used to continue of statements instead of given condition.
Syntax:-
continue;
#include<stdio.h>
#include<conio.h>
void main()
int i;
clrscr();
printf(“Display Number\n”);
if (i==7)
{
continue;
printf(“%d\t”, i);
getch();
3. goto statement:-
goto statement is working on level. It is used to jump from one level to another level.
Syntax:-
levelVarName:
//block of code
goto levelVarName;
Example: - int x;
x:
printf("welcome");
goto x;
Program 3 WAP in c to use of goto statement
#include<stdio.h>
#include<conio.h>
void main()
{
int i;
clrscr();
i=1;
x:
if(i<=20)
printf("%d\t", i);
i++;
goto x;
}
getch();
Date - 21/10/202
Definition:-
When any statement execute again and again on behalf of condition then we
used loop.
Control statement:-
1. Initialization
2. Condition
3. Updation
Updation - increment/decrement
The loop control that is check the condition at entry point is called
Syntax:-
Initialization;
while (condition)
//body of loop
Updation;
}
• for loop :-
for is also a keyword. It checked the condition, initialization and updation into a
single line. Separate by semicolon. The working of for loop and while loop is same but
Syntax is differ.
Syntax:-
//body of loop
Body of loop will be executed once time therefore conditions true or false.
It is also a keyword.
Initialization;
do
//body of loop
Updation;
} while (condition);
Date - 22/10/2020
Array in C:-
A single variable can hold only single value. If you declare that variable as an array then
that can holds multiple values of same data type.
Note: - Array is the collection of similar data type.
Syntax:-
Example:-
Initialization of an array:-
The initialization of an array starts from zero to n-1. Where n is the size of an array.
Name [0]='R'..........
Name [19]='T'
#include<stdio.h>
#include<conio.h>
void main ()
{
int n, i;
clrscr ();
printf ("Enter the size of list :");
scanf ("%d",&n);
list[i]=100*list[i];
{
printf ("list [%d]=%d\n", i, list[i]);
getch ();
Notes:-
2D Array:-
It have two subscript .one is used for number of rows and second is number of
columns.2D Array basically used for matrix representation
Syntax of 2D Array:-
Example:-
int n [3][2];
Nested Loop:-
When any loop is available in to another loop then this process known as nested
loop.
• First loop is called outer loop and second loop is called inner loop.
• When outer loop executes once a time then inner loop executes full time
according to condition.
{
//block of code
Date 24/10/2020
• cos()
• tan()
• log()
• floor()
• sound ()
• nosound()
• cprintf ()
• textbackground()
• textcolor().....etc;
Multidimensional Array:-
Multidimensional array, when two or more sub-script is available into an array
then that is called Multi dimensional array.
Syntax:-
Date - 26/10/2020
String in C:-
1 gets ()
2 puts ()
3 strupr ()
4 strlwr ()
5 strlen ()
6 strcpy ()
7 strcmp ()
8 strrev ().......etc
Syntax:-
Syntax:-
gets (charTypeArrayName);
2. strrev ():-
It is used to reverse of any string. strrev () method is also available into string .h header
file.
3. strcpy ():-
If you want to copy one string into another string then we used this method.
Syntax:-
Example:-
• 0 (str1==str2)
• 1 (str1>str2)
• -1 (str1<str2)
4. strcmp ():-
Syntax:-
Type of Function:-
1. Built-in Function
1. Built-in Function:-
Built-in Function is also known as library Function. It is already define into header file.
Example:- printf(),scanf(),gets(),puts(),getch()......etc.
The function that is define by user is called the user define function.
Type of UDF:-
Syntax of UDF:-
//block of code
}
Notes:-
Prototype:-
• Declaration
• definition
• calling
Note:-
1. If any function having parameter then input of that variable is not available inside of
function.
2. When any function returns any value then output of that function is not print inside of
function. If you want to return any value to the function then we used return keyword
//block of code
}
Example:-
void add()
{
//block of code
{
//block of code
Task
1. Find the sum of following series
1/1!+2/2!+3/3!+....................n term
ncr=n!/r!(n-r);
3. Create a UDF of prime () into mt.h header file by using last 3 type of UDF.
Prime number.
Date -30/10/2020
Structure:-
Structure is the similar or dissimilar data type.struct keyword is used to define the
structure. Struct is also a user define data type.
Syntax:-
struct StructureName
Data_Type VarName1;
Data_Type VarName2.......;
} StructureVarName;
Example of structure:-
struct student
int rollNo;
Example:-
void main()
int rollNo;
scanf("%d",&rollNo);
but
in structure
scanf("%d",&s.rollNo);
}
Union:-
Union is same like structure but it have the size as big size of data member
Syntax of union:-
union UnionName
Data_Type VarName;
Data_type VarName2;
................
} UnionVariableName;
2. Structure me jitne bhi variable honge sbko jodkr structure ki size define kiya jata hai
but union me jis variable ki size sbse bdi h usi ko define krta hai. Union ka use memory
utilisation ke liye kiya jata hai.
Syntax:-
struct StructureName
{
variable;
} StructureVariable [size];
Example:-
struck student
int id;
Date – 02/11/2020
Recursion: -
When any function called itself within scope then that function is called Recursive
function and this process is known as Recursion.
Example:-
int fact (int n)
Calling of Functions:-
• call by value
• call by reference
Pointer:-
Pointer is variable which holds the address of another variable. Pointer have two
symbols-
Syntax of pointer:-
Data_Type P*variable_Name;
Example :-
Int *x;
Example:-
int a=20;
int *x;
Date – 3/11/2020
File Handling:-
If any user want to store any data as permanently into your computer.
Types of Files:-
• text file
• binary file
Declaration:-
FILE *ptr;
printf()-----------fprintf()//output in file
scanf()-------------fscanf()//input in file
Syntax:-
Syntax:-
fprintf(File pointer Name,”identifire”,VarName);
Syntax:-
fclose(Pointer VarName);
Example:-
fclose(ptr);
• r=>read file
Task -1
Online Test – C Programming
• Rasmus Lerdorf
• Dennice Ritchie
• James Gosling
• None
Answer : B
Date – 5/11/2020
Syntax:-
FILE *p;
P=fopen (“File name”,”a”);
Read mode(r):-
Syntax of fgets():-
char str[200];
Task 1
User
-------------------------------------------------------------------------------------------------
------------------
Account Number
Amount
Program 1 //WAP in C by using file handling use write (w) mode
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char name[50];
char DOB[50];
char FName[50];
char MName[50];
char CName[50];
char Branch[100];
char PinCode[100];
char Addr[100];
FILE *fp;
clrscr();
fp=fopen("MyInfo.txt","w");
if(fp==NULL)
}
else
gets(name);
gets(DOB);
printf("\nEnter your Fathers Name :");
gets(FName);
gets(MName);
gets(CName);
printf("\nEnter your branch name :");
gets(Branch);
gets(PinCode);
gets(Addr);
clrscr();
printf("\n\n");
printf("*************Student Information************");
printf("\n\n");
printf("----------------------------------------------------------------");
printf("\n");
//Stored in File
fprintf(fp,"*************Student Information************");
fprintf(fp,"\n\n");
fprintf(fp,"----------------------------------------------------------------");
fprintf(fp,"\n");
getch();
}
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
char name[50];
char DOB[50];
char FName[50];
char MName[50];
char CName[50];
char Branch[100];
char PinCode[100];
char Addr[100];
FILE *fp;
clrscr();
fp=fopen("MyInfo.txt","a");
if(fp==NULL)
else
gets(name);
printf("\nEnter Your Date of Birth :");
gets(DOB);
gets(FName);
printf("\nEnter your mother Name :");
gets(MName);
gets(CName);
gets(Branch);
printf("\nEnter your PinCode number :");
gets(PinCode);
gets(Addr);
clrscr();
printf("\n\n");
printf("*************Student Information************");
printf("\n\n");
printf("----------------------------------------------------------------");
printf("\n");
//Stored in File
fprintf(fp,"*************Student Information************");
fprintf(fp,"\n\n");
fprintf(fp,"----------------------------------------------------------------");
fprintf(fp,"\n");
fclose(fp);
getch();
#include<stdio.h>
#include<conio.h>
void main()
char str[1000];
FILE *fp;
clrscr();
fp=fopen("myinfo.txt","r");
if(fp==NULL)
}
else
while(fgets(str,sizeof(str),fp))
printf("%s",str);
}
getch();
#include<conio.h>
void main()
char roll[10];
char name[30];
char FName[30];
char IDate[30];
float percent;
FILE *fp;
clrscr();
fp=fopen("mark.txt","w");
if(fp==NULL)
{
else
gets(roll);
gets(IDate);
scanf("%d",&Hindi);
scanf("%d",&English);
scanf("%d",&Mathematics);
scanf("%d",&Physics);
percent=(total*100)/490;
clrscr();
printf("\n\n");
textcolor(BLUE);
textbackground(WHITE);
cprintf(" Intermediate Marsheet ");
printf("\n\n");
printf("Name - %s",name);
printf("\t\t\t\tRollNo - %s",roll);
printf("\n\n");
printf("Father Name :-%s",FName);
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf(" 3 Mathematics 100 %d",Mathematics);
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf("-----------------------------------------------------------------------");
printf("\n");
printf("\t\tTotalMarks\t490\t\t%ld",total);
printf("\n\n");
printf("First");
{
printf("Second");
{
printf("Third");
else
printf("Fail");
//printf in file
fprintf(fp,"\n\n");
fprintf(fp,"Name - %s",name);
fprintf(fp,"\t\t\t\tRollNo - %s",roll);
fprintf(fp,"\n\n");
fprintf(fp,"\n\n");
fprintf(fp,"\n\n");
fprintf(fp,"\n\n");
fprintf(fp," 2 English 90 %d",English);
fprintf(fp,"\n\n");
fprintf(fp,"\n\n");
fprintf(fp," 4 Physics 100 %d",Physics);
fprintf(fp,"\n\n");
fprintf(fp,"\n\n");
fprintf(fp,"---------------------------------------------------------------------");
fprintf(fp,"\n");
fprintf(fp,"\t\tTotalMarks\t490\t\t%ld",total);
fprintf(fp,"\n\n");
fprintf(fp,"First");
}
fprintf(fp,"Second");
fprintf(fp,"Third");
else
{
fprintf(fp,"Fail");
fclose(fp);
printf("\n\n");
printf("File has been created successfully");
getch();
#include<conio.h>
void main()
char roll[10];
char name[30];
char FName[30];
char IDate[30];
long total;
float percent;
clrscr();
gets(name);
gets(roll);
printf("Enter Father name :");
gets(FName);
gets(IDate);
fflush(stdin);
scanf("%d",&Hindi);
scanf("%d",&English);
scanf("%d",&Physics);
scanf("%d",&Chemistry);
total=(Hindi+English+Mathematics+Physics+Chemistry);
percent=(total*100)/490;
clrscr();
printf("\n\n");
textcolor(BLUE);
textbackground(WHITE);
printf("Name - %s",name);
printf("\t\t\t\tRollNo - %s",roll);
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf("\n\n");
printf("-----------------------------------------------------------------------");
printf("\n");
printf("\t\tTotalMarks\t490\t\t%ld",total);
printf("\n\n");
{
printf("First");
printf("Second");
}
printf("Third");
}
else
printf("Fail");
getch();
#include<stdio.h>
#include<conio.h>
void main()
int i,j,product;
FILE *fp;
clrscr();
fp=fopen("tabl.txt","w");
if(fp==NULL)
printf("Error");
else
{
for(j=1;j<=10;j++)
{
product=i*j;
printf("%d\t",product);
fprintf(fp,"%d\t",product);
printf("\n");
fprintf(fp,"\n");
fclose(fp);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *ptr;
char msg[20];
clrscr();
ptr=fopen("myf1.txt","w");
if(ptr==NULL)
else
gets(msg);
fprintf(ptr,"%s",msg);
fclose(ptr);
}getch();
#include<stdio.h>
#include<conio.h>
void main()
FILE *ptr;
char msg[20];
clrscr();
ptr=fopen("myf1.pdf","w");
if(ptr==NULL)
else
fprintf(ptr,"%s",msg);
fclose(ptr);
getch();
}
#include<stdio.h>
#include<conio.h>
void main()
{
FILE *ptr;
char msg[20];
clrscr();
ptr=fopen("myppt.ppt","w");
if(ptr==NULL)
else
{
gets(msg);
fprintf(ptr,"%s",msg);
fclose(ptr);
getch();
#include<stdio.h>
#include<conio.h>
void main()
int r=0,w=0;
char opt1,opt2,opt3;
char name[40];
FILE *ptr;
clrscr();
ptr=fopen("Ctest.txt","w");
if(ptr==NULL)
{
else
{
printf("\n\n\n");
textcolor(RED);
gets(name);
clrscr();
textcolor(WHITE);
printf("\nD) None");
scanf("%c",&opt1);
fflush(stdin);
if(opt1=='B' || opt1=='b')
r++;
else
{
w++;
printf("\n");
printf("\nA) List");
printf("\nB) Collection");
fflush(stdin);
if(opt2=='B' || opt2=='b')
r++;
}
else
w++;
printf("\n");
printf("\nC) UDF");
printf("\nD) None");
printf("\nEnter your option :");
scanf("%c",&opt3);
fflush(stdin);
if(opt3=='A' || opt3=='a')
{
r++;
else
{
w++;
fclose(ptr);
getch();
#include<stdio.h>
#include<conio.h>
void main()
{
int opt1,opt2,opt3,w=0,r=0,score=0;
char name[40];
FILE *fp;
clrscr();
fp=fopen("HTML.txt","w");
textcolor(BLUE);
textbackground(WHITE);
printf("\n\n");
if(fp==NULL)
{
else
gets(name);
printf("\n\n");
scanf("%d",&opt1);
if(opt1==1)
{
r++;
score++;
else
{
w++;
}
if(opt2==2)
r++;
score++;
}
else
w++;
scanf("%d",&opt3);
if(opt3==2)
r++;
score++;
}
else
w++;
}
printf("\nRight Answer:%d\n",r);
printf("Wrong Answer:%d\n",w);
printf("Score:%d",score);
fclose(fp);
getch();
--------------HTML NOTES------------
HTML:-Hyper Text Markup language.
Types of tag:----
<…………/>
<img/>,<tagname/>
Ex:-<link/>,<br/>,<hr/>,<base/>……etc.
Syntax:--
<……./>…<…./>
Text tag:--
1.<heading>:==
<h1>………….</h1>
<h6>.........</h6>
<span>………..</span>
<i>………….</i>
<u>……………</u>
<label>…………</label>
<br>
<pre>…….</pre>
<marquee>………..</marquee>
<p>…………</p>
<title>………….</title>
1.Direction=”…….”
2.Scrollamount=”…….”
3.Behaviour=”alternate”
4.ommouseover=”stop()”
5.onmouseout=”start()”
6.height=”……..”
7.widht=”…”
Image tag:--
text-transform : uppercase;
text-transform : lowercase;
text-transform : capitalize;
column-span:all;
text-indent:..px;
overflow:hidden;
resize:both;
text-align:justify;
Type of List:----
4.Nested list:-
1.Order List:-----
<ol>
<li>….</li>
<li>.....</li>
</ol>
Type=”….”
Type=”A”
Type=”1”
Start=”…”
2.Unorder List:--
Syntax:--
<ul>
<li>……</li>
……………..
………….
<li>…………</li>
</ul>
Type=”circle”
Type=”square”
3.Description list.:--
Syntax:--
<dl>
<dt>….</dt>
<dd>….<dd>
</dl>
4.Nested list:--
Syntax:--
<ol>
<li>
<ol>…</ol>
</li>
<li>……</li>
</ol>
Table tag:-
<table>
<tr>
<th>…</th>
</tr>
<tr>
<td>..<td>
..
<td>..</td>
</tr>
</table>
Anchor tag:--
For tag:--
<input />
<button>…..</button>
<label>….</label>
<span>….</span>
<textarea>……</textarea>
<option>…..</option>
<select>….</select>
<option />
Button type:--
1.Submit button
2.Reset Button
3.Dummy button
6. <button type=”button”>Dummy</button>
Input controls:--
1.Input text <input type=”text”> string value
10.<textarea>..</textarea>
11.<input type="hidden">
12.<input type="average">
Drop down:-
<select>
<option>..</option>
<optin>…</optin>
</select>
7.method=”..”
1.<header>….</header>
2.<section>….</section>
3.<footer>…</footer>
4.<iframe>…</iframe>
5.<frameset>…..</frameset>
6.<details>
<summary>....</summary>
<p>.....</p>
</details>
7.<summary>….</summary>
8.<video controls>
<source>.....</source>
</audio>
10.<datalist>……</datalist>
<datalist>
<option value=".....">
<option value="....">
</datalist>
11.<sup>..</sup>
12.<sub>….</sub>
13.<option />
14.<colgoup>…</colgroup>
15.<col />
16.<source>…..</source>
17.<fieldset>
<legend>....</legend>
</fielset>
18.<legend>…</legend>
19.<main>....</main>
--------------CSS NOTES------------
It is developed by Hecan viumly.
Type of CSS:==
==========
1.INLINE CSS
2.INTERNAL CSS
3.EXTERNAL CSS
=================
1.INLINE CSS:-
=============
Inline css is the write code in same line with help of style attribute property
html tag.
Example:==
<div style=”….;…;….;…;…”></div>
1.color:…….;
2.text-align:…..;
3.font-size:….;
4.font-family:….;
=======================================
Background property:-
======================================
1.Background:….;
2.Background-color:….;
3.Background-image:url(‘……..’);
4.Background-attachment:fixed;
5.Background-repeat:no-repeat;
6.Background-size:cover;
7.height:…..;
8.width:….;
9.background:linear-gradient(…,…,…,..,);
Margin Property:=====
1.margin-left:…;
2.margin-right:….;
3.margin-top:…..;
4.margin-bottom:…..;
Padding Property:=====
1.padding-left:…;
2.padding-right:….;
3.padding-top:…;
4.padding-bottom:…;
5.padding:….;
1.Selector:====
Selector which are identify any tag of html some symbole used in selector.
Like as #,*,.;
Type of selector:--
1.id selector.(#)
2.class selector.(.)
3.Element selector.
4.Group selector.
5.Universal selector.
Syntax of id selector:--
#selectorName
Ex:--
<html>
<head>
<style>
……
</style>
</head>
<body>
<div id=”……”></div>
</body>
</html>
.selectorname
Ex:--
<html>
<head>
<style>
.outer
……..
</style>
</head>
<body>
<div class=”……”></div>
</body>
</html>
3.Element selector:--
Tagname
….
Ex:==
<html>
<head>
<style>
……..
</style>
</head>
<body>
<p>Welcom to Lucknow</p>
</body>
</html>
Group Selector:===
Tagname,tagname,tagname
Universal Selector:==
*{
Internal css:==
Internal css is the write code in same html page with the help of style tag in
head section block.
Ex:==
<html>
<head>
<style>
</style>
</head>
<body>
</body>
</html>
1.border-radius:….;
2.border-radius:…,…,…,….,…;
3.border-radius:50px;
4.border-radius:50%;
5.border-radius:50cm;
=======================================
Boredr tag=
===========
=======Bootstrap===========
=>Bootstrap is the popular html, css and javascript framework for
developing a responsive and mobile friendly website.
Developed by Mark Otto and Jacob tornton in year 2010 name of twitter
Blueprint.
1.class="container"
2.class="container-fluid"
Row :--
Ex:---
<html>
<head>
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="col-md-4"></div>
<div class="col-md-4"></div>
<div class="col-md-4"></div>
</div>
</div>
</div>
</body>
</html>
=================================
-----------JAVA NOTES------------
JAVA:-
Java is Object Oriented Programming Language.
Features of java:-
There are some features of java.
1. Simple
2. Object Oriented
3. Portable
4. Compile Both
5. Secure......etc.
1. JDK 7,8...
Software Requirment:-
1. JDK:-jdk stand for Java Devolopment Kit. It is the
collection of Multiple software like as----
JIT,JRE,GC,JVM....etc.
Compilation Scanario of Java:-
GC <>||
JVM IBM
Public is a keyword.
public is access_modifier that is used to global declaration
of any member of method.
How we can create a java program:- Ther are some step are
used.
2. Package Section
3. Class Section
4. Main Section
{
5. I--->input,P-->process,O-->outpu.
class demo
{
public static void main(String[] agrs)
.//code bolck
}
User define function block
Note:-
If you want to create a package then we used package
keyword or built-in package import.
Note:-
Syntax of package:-
importjava.io.*;
import--->keyword
io--->package name
*--->is indicate that you want to access all classes from io
package.
B. .nextint().
C. .nextfloat()......etc.
Syntax:
sc.varname=sc.nextint();
Ex:-
Scanner sc=new Scanner(system.in);
How to run program in command prompt.
1. javac programname.java
2. classname.java
Array:-
Syntax:-
Data_Type[]Varname=new Data_type[Size]
Ex:-
int[]list=new int[10];
OOPS:——(object oriented programming system).
Ex:-
Mobile,laptop,watch …etc
Features of OOPS:—
I. class
II. object
III. inheritance
IV. polymorphism
V. Encapsulation
Inheritance:—
• multi -inheritence
Polymorphism:-
▪ compile time polymorphism
Method
-------------------------------------------------------
Note:-
When we inherit one class into class we used Extends
Keyword.
1. Multiple inheritance:-
Syntax:-
class A
{
class B extends A
{
}
class C extends B
}
Data Abstraction:- Data abstraction is known as data hiding
or acces specifier.
1. public
2. protect
3.private
Ex:- int a;
Protected:- protected is also a keyword it define data
members or data method can called only child class.
Ex:- Water,shape,human...etc
Ex:- sum(),sum(inta,intb),sum(inta,intb,intc)
sum(inta,intb,intc);
2. Run Time Polymorphism(method overriding):-
=> into this concept method and perameter both are same
,the value of parent class...
====================================
4. no of arguments | 4. no of arguments
Note:-
1. Connection
2. DriverManager
3. PreparedStatement
4. ResultSet
Database
=================================
------------Database-------------------
Database:-Data is raw fact material,when any user input any things that remain into
raw form.
SQL:- SQL stands for Structure Query language it is not a programming language
But it is a database programming language.
insert,update,delete
create,alter,truncate,drop
==========1.Create:=========
Col1 datatype(size),
Col2 datatype(size),
Col3 datatype(size);
)
Ex:-
name varchar(30),
mob varchar(16),
email varchar(100),
msg varchar(200);
=================2.Insert:===================
Insert command is used to insert the data into database table. Syntax:-
==================3.Select(Read):============
Syntax:-
Ex:-select*from contact;
===================4.Update:==============
===============5.Alter:===============
===================6.Delete:================
Delete command is used to delete the record into database table in row wise.
=====================7.Truncate:===============
================8.Drop:====================
=>Identity (SEED,Identity(def)):(1,1)
Set Opreator:-=> To combine two or more than two select statement , that process is
called operator.
1.Union
2.Union All
3.Entersect
4.Except
=============1.UNION=============
=>To combine two or more than two select statement as a single unit without dublicate
value.Common value only one time execute.
===========2.UNIONAll==========
=>Two combine two or more than two select statement as a single unit with duplicate
value.
=========3.INTERSECT-:===========
=>To return the all value from the left hand side table which are not found in the right
hand table.
===============Rules============
==========Clause===========
1.Group By Clause:-It is used to grouping the similear data based on the column..
2.Having Clause:-----
->To filitring the records After grouping the data having clause can be used with group
by clause.
=============JOIN:===========
JOIN OPRATION:--
2.Projuction---------->With on keyword.
3.Join:- When we retrive the data from more than One table,That process is called join.
1.ANSI Formate:- With "ON" keyword join Condition,that process is called ANSI formate
join. It's also called New Style Formate Join.
There are some type of a ANSI formate join.
1.Inner Join
2.Outer Join
3.Cross Join
4.Natural Join
5.Self Join
===============1.INNER JOIN=========
When we retrive the data from multiple table based on equality coundition, That process
is called inner join.
3.Matching data/rows.
= ==============2.OUTER JOIN:-==============
Outer join is used to matching and unmatcing data from the table.
1.LEFT OUTER JOIN:----- Left outer join show the data matching and unmatching data
BUT Left side All data show and Right side only matching data show.
2.RIGHT OUTER JOIN :------- Right outer join show the data matching and unmatching
BUT Right side all data show and Left side only matching data show.
3.FULL OUTER JOIN:------Full outer join show the data matching and unmatchiong data
BUT Left side All data show and Right side All data show.
4.NATURAL JOIN:- It's not support SQL,It's the concept we can use Oracal.
5.SELF JOIN :----- Joining a table data by itself, that process is called self join.
-----------------------------------------------------------------------
---Date 30/11/2023----
---Topic Non-ANSI Formate join=-----
---step 1 create database ------
CREATE DATABASE EQUI
use EQUI
---step2 create table -----
CREATE TABLE Emp
(
Eid int,
Ename varchar(200),
Esalary money
);
CREATE TABLE Emp1
(
Eemail varchar(100),
cname varchar(100),
Eid int
)
insert into Emp values (101,'Ram',2000)
insert into Emp values (102,'Shyaam',3000)
insert into Emp values (103,'Sita',4000).
select * from Emp
select * from Emp1
insert into Emp1 values
('[email protected]','Mecatredz',101)
insert into Emp1 values
('[email protected]','Technology',102)
insert into Emp1 values
('[email protected]','Pvt',103)
----use of equi join matching data show ----
select* FROM Emp,Emp1 WHERE Emp.Eid = Emp1.Eid;
SELECT * FROM Emp,Emp1 WHERE Emp.Eid<Emp1.Eid
--------------------------------------------------------------------
---Date 28/11/2023---
-----Topic Join------
---Step1 create database---
CREATE DATABASE MTJOIN
use MTJOIN
---step2 create table ---
CREATE TABLE Student
(
sid int,
sname varchar(200),
semail varchar(100),
courseId int
)
---step3 use of select command ----
SELECT * FROM Student
SELECT * FROM Course
---step4 create a new table ----
CREATE TABLE Course
(
courseId int,
Cname varchar(200),
Cfees decimal
)
---step5 use insert command in table course-----
INSERT INTO Course VALUES(10,'MTech',2000)
INSERT INTO Course VALUES(20,'BTech',1000)
INSERT INTO Course VALUES(40,'DIPLOMA',7000)
INSERT INTO Course VALUES(50,'BCA',6000)
---step6 use of inner join------------
SELECT * FROM Student inner join Course ON
courseId=courseId ---error because server has
confused not find table name---
SELECT * FROM Student inner join Course ON
Student.courseId=Course.courseId---true condition--
-
--use of left outer join--
SELECT * FROM Student left outer join Course ON
Student.courseId=Course.courseId
SELECT * FROM Student s left outer join Course c ON
s.courseId=c.courseId
---use of right outer join ---
SELECT * FROM Student right outer join Course ON
Student.courseId=Course.courseId
--use of full outer join----
SELECT * FROM Student s full outer join Course c ON
s.courseId=c.courseId
--use of cross join--
SELECT * FROM Student cross join Course
--------New Topic Self join---------------
---step1 create database ----
CREATE DATABASE SelfJoin
--step2 create table -----
CREATE TABLE Emp1
(
Eid int,
ename varchar(200),
salary money,
email varchar(90),
mob varchar(20)
)
---INSERT COMMAND ----
INSERT INTO Emp1 VALUES
(201,'Amit',2000,'[email protected]',8898282728)
INSERT INTO Emp1 VALUES
(202,'Amrita',3000,'[email protected]',8151282728)
INSERT INTO Emp1 VALUES
(203,'Sandeep',4000,'[email protected]',8898234567)
INSERT INTO Emp1 VALUES
(204,'Sumit',5000,'[email protected]',7454746474)
INSERT INTO Emp1 VALUES
(205,'Diksh',6000,'[email protected]',164983219)
--select table---
SELECT*FROM Emp1
--use of self join-----
SELECT * FROM Emp1 where salary =salary----same
result but we want to merg two table then we need
Alias---
SELECT * FROM Emp1 e1,Emp1 e2 WHERE e1.Eid=e2.Eid
SELECT * FROM Emp1 self join Emp1 ON
Emp1.Eid=Emp1.Eid
-------------------------------------------------------------------
1.Named Block
2.Written code in Sub block in save Database. That code can be use
(.net/java/DBApplication...).
1.Stored Function
2.Store Procedeure
1.A function must have a name and function can never start with special charectre.
Ex:----@,$,#,%....etc.
1. SUM()
2.AVG()
3.MIN()
4.COUNT()
5.DATETIME()
6.GETDATE()...etc.
Function compile every time.In a procedure function only work with input parameter.
Type of function:------
=================Store Procedure==============
* Working with store procedure:---There are pre compiled (on compilation )block. It's
provide security in our project. We can create a store procedure in Two ways.
As
begin
<body of code>
End
Syntax:--
exec/execute procedure_name/p ;
2.Out parameter():- Return the value from Store procedure in OUT keywords.
(
@variable_name data_type(size),
@variable_name data_type(size),
..................................
AS
BEGIN
//code here
END
----------------------------------------------------------------------
>Insert
>update
>Delete
<write statement>
Sy:---BEGIN TRANSACTION
<write statement>
commit
ROLLBACK
2.2.SAVE POINT:------It's used to create temp memory for store the data values which we
want to conditionally cancelled.
Sy:-
Begin Transaction
<.....>
<...........>
---------------------------------------------------------
----use INSERT,UPDATE,DELETE-----
exec CRUD
@id=6,@ename=SURAJ,@location='HYD',@Department='JE'
,@Age='60',@choice='insert'
exec CRUD @id=103,
@ename='ABHINAV',@location='JHASHI',@Department='II
T',@Age='40',@choice='update'
exec CRUD
@id=6,@ename='edehbj',@location='ghhds',@Department
='gfgdhvh',@Age='75',@choice='delete'
---------------------------------------------------------
================= ORACLE=====================
DBMS:----DBMS stand for db management system.
NOTE:----
dbms_output.put_line('msg here');
---------------------------1.Decleration section:------------------------
Synatx:-----varname data_type;
Ex:------a number;
NOTE:------If you want to decleare any variable then this is default part.
If you want to start your program of your logic then this part execute all SQL command
.This is essential part.
-----------------------3.Exeception section:-----------------
If any error genrated in our SQL command then this section display error.
--------------------------4.End section:------------------------
Ex:------
//input:---- a :80;
================Statement==============
1.Conditional Statement
2.Looping Statement
--------------------1.Conditional Statement:-----------------------
-------------1.If Statement--------
//block of code;
end if;
//block of code;
else
//block of code;
end if;
------------3.Else if Statement ------------
//block of code;
//block of code;
.....................
else
//block of code ;
end if;
-------------4.Nested if Statement---------------
Sy:---
if condition THEN
if condition THEN
//block of code;
else;
//block of code;
end if ;
else
//block of code;
end if;
Sy:- BEGIN
case var;
when condition1 THEN
.............
end case;
end;
---------------LOOPING--------------
--------For Loop------------
Ex:--for i in 1..10
LOOP
//block of code ;
end loop;
===============================================
NOTE:---
=>If you have knowedge of any programming language like as C,C++,C#....... then
you can learn vary easily.
-----------------JavaScript Example------------------
<script type =”text/javascript”>
Explanation of Example:-
-----------------Syntax of javascript:----------------------
<script>//javascript code here…..
</script>
NOTE:----JS have No data_type. If you want to declare any variable, then we use
(var) keyword.
-----------------Input/Output Function:--------------
-------------------------Input Function-----------------
b).confirm()
1.prompt():-----> it's also input the value of string type but if user input
int,float,double......etc them he convert it.
Sy:----> var a;
a=prompt("message here");
2.confirm():-----> Confirm method is also a input method,it return the value of Boolen
(true || false)type.
-------------------Output Function-------------------------
1.alert() 2.write()
---------------1.Alert:-------------
--------------2.Write :--------------
It's also a output function. It can't call directely,it's call with of a DO(Document Object).
------------------TYPE CASTING----------------
Convert one data type to another data type, then this process is known as typecasting.
Datatype converstion:-----> If you want to convert string value to into another type of
value then we use following method.
Ex:----> parseInt(string_value),parseFloat(),parseDouble()...etc.
----------------------Statement-----------------
Note:----Same like as C language.
-----------1.Conditional Statement-----------
a).If Statement:----------->
//block of code
//block of code ;
//block of code;
3.Else-If :--------> Ladder if (else-if) .By using ladder i fbe can check multiple condition at
a time but only one condition will be execute at a time.
Sy:---->if(condition1)
//block of code ;
else if
{
//block of code;
........................................
else
//block of code ;
Sy:---->
switch(varname)
case 1:
//block of code;
break;
case ....:
//block of code;
..............
default:
-------------Looping------------
If you want to execute block of code again and again based on condition, than this
process is known as Looping.
Type of loop:-----
{ //block of code ; }
2.While Loop:----->Sy:---->
initilization;
while (condition)
{//body of loop;
//updation; }
3.Do-while:----------->
Sy:--> initilization
do
//body of loop;
//updation;
while(condition);
Sy:------getElementById("idname");
Ex:-----
getElementById("a1").value;
---------------------------Function-------------------------------
Sy:----function functionname()
//block of code;
Ex:------function f1()
//block of code;
-------------------------ARRAY-----------------------------
We know that array is the collection of similar data type, But in JS have no data type.
Sy:-------
Sy:-----
Ex:-----
var[0]="Ram";
var[1]="34"
var[2]="90"
...............
var[4]="87"
var color=["red","black","blue","orange"];
Note:----If you want to find the length of an array then we use length property.
----------------------Events--------------------
1.onclick():---
2.onchange():-----
3.onmouseover():----
4.onmouseout():-----
5.onload():-----
6.onkeypress():----
7.onkeypressout():-----
8.onkeyup():----
-----------------InnerText and InnerHTML:----------------------
InnerText property are used to set/get any normal text of selector html element.
Sy:---->var x;
Ex:----><div id="b1">Hello</div>
document.getElementById("b1").innerText;
Sy:--->innerHTML
document.getElementById("b1").innerHTML;
Ex:---->
x=document.getElementById("b1").innerHTML="<h1>RAM</h1>";
-------------------------------Validation ---------------------------
1.Client Side Validation:-----------> Client Side Validation ,It's Validate On The Browser
and use the client side programming language.
Ex:----->Like as:-PHP,ASP,JSP,SERVLET,PYTHON....etc.
------------------------------This():---------------------------
------------------------Array of Object:--------------------------
Is the collection of smillar datatype but array of object is the collection of array.
Syntax:-
Var arrayofobjectname=[{property:”value”},{property:”value”}];
Ex:-
Var student=[{name:”ram”,age:20},{name:”name:”Shivam”,age:20}];
------------------------------------------
--------------------------------
Project Work
MVC concept into .Net froamework is version of incremented of ASP.Net ,so it is called
Asp.net mvc framework.
Model <------>Controller<------->View
Source Code ------------> IL Code (Byte Code)------>CLR------>Intel/IBM
JIT(Just In Time)
It's same like as header file. It's the collection of classes and classes is the collection of
methods and variables.
If you want to use any built in name space then we used using keyword.
2.UDF
The name space that is define by user is called the user define name space.
NOTE:--->If you want to define any name space then we used name space
keyword.
Sy:----->
namespace Namespace
//coding.................
--------------Output method:------------
1.Write()-----
Sy:---> Console.Write()
2.WriteLine():-----
Sy:-->Console.WriteLine()
--------------------Input method:--------------
1.Read()-->It return ASCII value of any charater and return into int formate.
Sy:---> string n;
n=Console.ReadLine();
Note:----->All above methods are available into Console class and Console class is
available into System name Space.
When we convert one data type into another data type then weused type casting.
Float x=56.89;
int a;
a=(int)x; //56
2.Parse() method:--- We can also convert data type by using parse() method.
Ex:----> int a;
a=int.Parse(Console.ReadLine());
3.Convert() method-------------
Ex:-----ToInt32(),ToFloat(),ToDouble(),ToString().
Convert.ToFloat(Console.ReadLine());
----------------------------String in C#------------------
Collection of Characters.
string name="ABHI";
-------------------Loop-------------------
1.Indexed Base
a).Entry Control
I.While II.For
2.Collection Based
a).ForEach
--------------ForEach------------
It's also a keyword .it word on collection.
//code here;
foreach(char ch in name)
//print a;
----------------------------------Array in C#-----------------------------------------
Ex:---->int[]list=new int[10];
2.2D Array:-------------> It have Only single sub-script but seprated by comma oprator.
Sy:-->Data_Type[,]Arryname=new Data_Type[rows,colums];
string name="ABHI";
name.IndexOf('A');
string s = img.Substring(img.LastIndexOf('.')+1);
5.substring()---------->When we cut any string from given string then cut string is
called substring.
--------------------Params Array-------------------
When we pass any array into parameter of any function by using params keyword.then
it is called params array.
---------------Function---------------
1.Syntax:---->Return_Type Functio_Name(Parameter)
//block of code;
//code block;
-----------------OOPS---------------------
1.Class
2.Object
3.Inheritance
4.Polymorphism
5.Encaptulation
6.Data Abstraction
-----------------------1.Class----------------------
Class is a keyword and it is also a UDF Data Type.It is also known as a Wrapper.Class is
also a Collection of the Data Members and Data Methods.
Syntax:-->Class Class_Name
//Data Member
//Data Method
-----------------------2.Object---------------------
----------------------3.Inheritance ---------------------
Inheritance is also Feature of an OOPS we can inherit one class by using another class.The
single that is used to inherit by second class then second class is called the
Child/Base/Derrived and first class is called the Parent /Root Class.
NOTE:---->if you want to inherit of any parent class then we used colon(:) symbol.
Synatx:----class A //parent
//code
//code
1.Single Level Inheritance :------>When we have Only single parent class and single child
class.
2.Multi Level Inheritance :-------> It have many Level . one class inherit to other class and
other to next.
------CLASS---------
2.If you want to define any class then we used class keyword.
3.Method definitation and decleration both inside called of class.
-----INTERFACE-----
-----------------4.Polymorphism-----------------------
Method Overloading :----> When we have same name of any method but paramenter
are change then this type of method is called Method Overloaded and this process is
know as Method Overloading.
------------------2.Runtime ----------------
Method Overriding :------> When we have same name and paramenter of any method
inside of parent and child class then parent class method body is overriding by child class
method.
-----------------5.Encaptulation---------------------
Ex:---- TV,CARS,MOBILE...ETC.
------------------Constractur:---------------
It is a special data member of class. It have no any return type not even void().It always
remain Public.
It never call when we create an object of any class then it callled Automatically.Every Have
a Default constructor.
Type Of Constructor :
1.Default Constructor
2.Parametrized Constructor
3.Copy Constructor.
-----------------6.Data Abstraction----------------
--------------------------------------ADO.NET --------------------------------
Ex: object.Open();
Ex:---Object.Close();
3.State:---> It is used to check of current connction state.
Ex:-----Object.State;
2.SQL Command:----- It contain SQL command and provide some methods for execution
of that commands.
ExecuteNonQuery():----- It always return the number of affected rows and number of into
int formate. So it return type is int.
Ex:---> object.ExecuteNonQuery();
Data namespace.
---------------------------------------------------------------------------------
-----------------JQUERY--------------------------
jQuery:-
2. document:-
ready () is also a method that is used to ready for all event .load event.
4. Anonymous method:-
function(){
//code................
}
Input from input control by using jQuery:-
jQuery syntax:-
var t=$("#t1").val ()
value=val()
innerText=text()
innerHTML=html()
Date: - 05/12/2020
1. val ()
2. text()
3. html()
4. attr ()
attr ()
Syntax:-
$(selector).attr (function () {
//code here......
});
5. prop ()
2. css()
3. fadeIn()
4. fadeOut()
5. fadeToggle ()
6. show()
7. hide()
8. toggle()
9. slideUp()
10. slideDown()
11. slideToggle()...........etc
$("selector").methodName ();
animate ()
It is used to animation that is used to move one control from one place to another
place. otherwise you can also apply another effect of animation by using animate
method.
Syntax:-
$(selector).animate ({property: value...}, delay);
Date: 07/12/2020
Some Important built-in function:-
1. css ()
2. addClass ()
3. append()
4. removeClass()
5. prepend()
• css():-
Syntax:-
$("selector").css("propertyname","value");
Syntax:-
$("selector").css({“property name”:”value1”,.........});
• addClass method:-
Syntax:-
$("selector").addClass("ClassName");
Ex.
.im
• removeClass:-
Syntax:-
$("selector").removeClass ("ClassName");
• hasClass():-
• append():-
Syntax:-
eq()
Date – 10/12/2020
Query String:-
If you want to send the value from one page to another page then we used this concept.
PageNamewithExtension? VarName=value;
Example:-
p1.html?21;
URL:-
URL is a class that has built parameterized constructer to get current page url.it search
query string variable value with the help of searchParams property.
Syntax: var p=new URL(page URL).searchParams;
get() method:-
get () method is used to get the value from query string by using query string
variable.this method is define into URL class.
NOTE:---
=>If you have knowedge of any programming language like as C,C++,C#....... then
you can learn vary easily.
JavaScript Example:-
<script type =”text/javascript”>
document. write(“Welcome in JavaScript”);
</script>
Explanation of Example:-
</script>
NOTE:----JS have No data_type. If you want to declare any variable, then we use
(var) keyword.
Syntax:-
<html>
<head>
<title></title>
</head>
<body>
<script type=”text/javascript”>
alert(“Hello JavaScript”);
</script>
</body>
</html>
• code between the head tag
Syntax:-
<html>
<head>
<script type="text/javascript">
function msg(){
alert("Hello Javatpoint");
}
</script>
</head>
<body>
<p>Welcome to JavaScript</p>
<form>
<input type="button" value="click" onclick="msg()"/>
</form>
</body>
</html>
<html>
<head>
<title></title>
<body>
<p>Welcome to JavaScript</p>
<form>
<input type="button" value="click" onclick="msg()"/>
</form>
</body>
</html>
==========================================
• Using innerHTML:-
<html>
<body>
<h1>My First Web Page</h1>
<p>My First Paragraph</p>
<p id="demo"></p>
<script>
document.getElementById ("demo").innerHTML = 5 + 6;
</script>
</body>
</html>
2. Using document.write ():-
<html>
<body>
<h1>My First Web Page</h1>
<p>My first paragraph</p>
<script>
document.write (5 + 6);
</script>
</body>
</html> <html>
<body>
<h1>My First Web Page</h1>
<p>My first paragraph.</p>
<script>
document.write(5 + 6);
</script>
</body>
</html>
• Using window.alert():-
<html>
<body>
<h1>My First Web Page</h1>
<p>My first paragraph</p>
<script>
window.alert(5 + 6);
</script>
</body>
</html>
• Using console.log:-
<html>
<body>
<script>
console.log(5 + 6);
</script>
</body>
</html>
Use of javascript:-
• Inline javascript:-
2. Internal javascript:-
3. External javascript:-
We have a separate file of js and link into html page by using script tag.
Syntax:-
1. Class
2. Object
3. Inheritance
4. Polymorphism
5. Encapsulation
6. Data Abstraction
7. Message Passing
1. Class:-
Class is a keyword that is used to define of any class. Class is also a user define
data type. Class is collection of data members (variable) and data method
(function).
Syntax:-
class className
//data members
//data methods
}
Example:-
class student
//data members
//data methods
• Object:-
Object is a real world entity. It provides the reference of any class variables
and methods.
Syntax:-
Example:-
• new is a keyword.
Date: 01/12/2020
Inheritance:-
Inheritance is also a feature of object oriented programming language. We
can create a new class by using existing (old class) class. The old class is called the
parent/node/base class and new class is called the child/derived class.
Type of inheritance:-
1. Single inheritance
2. Multi level
3. Multiple-----not support
• Javascript me kisi class ko dusri class me inherit krne ke liye extends keyword
ka use kiya jata hai.
• If you want to inherit any class by using another class then we used extends
keyword.
• Child class ke dwara base class ke sbhi property ok access kr sakte hai isliye
hm childe class ka object bnate hai.
1 Single Inheritance:-
Syntax:-
{
//code here....
//code here.....
}
2. Multi level inheritance:-
//code here…..
{
//code here………
//code here…..
Task: 01/12/2020
Polymorphism:-
Type of polymorphism:-
1. Method Overloading:-
Syntax:
Sum (a, b)
Sum (a)..........etc.
Note: Type of method in c programming language-
• Formated
Gets(),getch()………etc
2. Method overriding:-
One method define into parent class and any user want to define same method
with parameter into child class then the body of parent class method override by
child class method.
Syntax:-
class A
{
f1()
//code here
class B extends A
{
f2()
{
//code here