0% found this document useful (0 votes)
24 views33 pages

It Project For Class 12

Uploaded by

R.K. PATWARIYA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views33 pages

It Project For Class 12

Uploaded by

R.K. PATWARIYA
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Affiliated to CBSE New Delhi

Address:
Near Gandhi Institute, Opp. Jainpur, Hapur Bypass, Meerut

PRACTICAL FILE
Subject: Information Technology
Code: 802

Session- 2024-25

SUBMITTED TO: SUBMITTED BY:


Mr. Ravindra Kumar NAME:
CLASS:
ROLL NO:
ACKNOWLEDGEMENT
I wish to express my deep sense of
gratitude and indebtedness to our learned teacher
Mr. Ravindra Kumar , PGT, Gandhi
International Public School for his invaluable
help, advice and guidance in the preparation of this
project.

I am also greatly indebted to our principal


Dr. Madhulika Singh and school authorities for
providing me with the facilities and requisite
laboratory conditions for making this practical file.

I also extend my thanks to a number of


teachers, my classmates and friends who helped me
to complete this practical file successfully.

[ STUDENT NAME]
CERTIFICATE
This is to certify that [STUDENT
ANME], student of Class XII, Gandhi
International Public School has
completed the PRACTICAL FILE during the
academic year [2024-25] towards partial
fulfillment of credit for the Information
technology practical evaluation of 2024-25
and submitted satisfactory report, as compiled
in the following pages, under my supervision.

Total number of practical certified are:


.

ExaminerSignature

Date: School Seal


Principal Signature
SQL QUERIES

S.NO TOPIC

1 Creation of a database using mysql command.

2 Deletion of a database using mysql command.

3 Creation of a table using mysql command.

4 Show the databases and tables created in mysql.

5 List out the field name along with its field type and constraints for a table.

6 Set a default value for a field in a table.

7 INSERT VALUES INTO the table.

8 Display the details of a field in a Table based on a given condition.

9 UPDATE the details of a field in a Table based on a given condition.

10 AGGREGATE FUNCTIONS in mysql.


JAVA PROGRAM

S.NO TOPIC

1 Print the string Hello World.

2 Display character A to Z using for loop.

3 Check if a given Number is Positive or Negative or Zero using if..else


statement.

4 Find the largest among three numbers using if..else statement.

5 Check whether a number is even or odd using if...else statement.

6 Generate Multiplication Table (number of iteration from 1 to 10) using for


loop.

7 Find the Area of Rectangle by getting the input of length and breadth
from the user during run time.

8 Print the sum of first 10 natural numbers 1 to 10.

9 Generate FIBONACCI SERIES by getting the input of number of terms in


the series during run time.

10 Print the FACTORIAL of a given number.

OPERATING WEB BASED APPLICATION

S.NO TOPIC

1 Online Bill Calculator - Book Rail Ticket


SQL
QUERIES
1. Write down syntax and mysql program to create a database STUDENT
and its OUTPUT.

SYNTAX

PROGRAM

mysql> create database student;

OUTPUT

mysql>create database student;


Query OK, 1 row affected
mysql>use student;
Database changed
mysql>
2.Write down syntax and mysql program to delete a database STUDENT and its
OUTPUT.

SYNTAX

PROGRAM

mysql> drop database student;

OUTPUT
3.Write down a mysql program to create a table TEACHER with the following field
names given below and its OUTPUT.

 Teacher_ID,
 First_Name,
 Last_Name,
 Gender,
 Salary,
 Date_of_Birth,
 Dept_No

PROGRAM

mysql> CREATE TABLE TEACHER


(
 Teacher_ID INTEGER,
 First_Name VARCHAR(20),
 Last_Name VARCHAR(20),
 Gender CHAR(1),
 Salary DECIMAL(10,2),
 Date_of_Birth DATE,
 Dept_No INTEGER
);

OUTPUT
4. Write down mysql program to show the databases and tables created?

PROGRAM
mysql> show databases;

OUTPUT

PROGRAM
mysql> show tables;

OUTPUT
5. Write a mysql program to list out the field name Teacher_ID,
First_Name, Last_Name, Gender, Salary, Date_of_Birth, Dept_No
along with its field type and constraints for the table TEACHER in the
database STUDENT.

PROGRAM
mysql > use student;
Database changed

mysql > desc teacher;

OUTPUT

6
6. Write
down mysql program to set a default value for the field SALARY as
30000 to the table name TEACHER whose field names are listed below
 Teacher_ID,
 First_Name,
 Last_Name,
 Gender,
 Salary,
 Date_of_Birth,
 Dept_No

PROGRAM

mysql > desc teacher;

mysql > ALTER TABLE TEACHER ALTER SALARY SET DEFAULT 30000;

OUTPUT

7
7.Write a mysql command to INSERT VALUES INTO table TEACHER in its field
Teacher_ID, First_Name, Last_Name, Gender, Salary, Date_of_Birth, Dept_No

PROGRAM

mysql > INSERT INTO Teacher (Teacher_ID, First_Name, Last_Name,


Gender, Salary, Date_of_Birth, Dept_No) VALUES(101,"Shanaya", "Batra",
'F', 50000, '1984-08-11', 1);

OUTPUT
8.Write a mysql command to display the details of a Teacher whose
Teacher_ID=101.

The field names in Teacher table is listed below.

 Teacher_ID,
 First_Name,
 Last_Name,
 Gender,
 Salary,
 Date_of_Birth,
 Dept_No

PROGRAM

mysql > SELECT * FROM TEACHER WHERE Teacher_ID=101;

OUTPUT

9
9. Write a mysql command to UPDATE the details of Salary as 55000 in Teacher
table whose Teacher_ID=101.

The field names in Teacher table is listed below.

Teacher_ID, First_Name, Last_Name, Gender, Salary, Date_of_Birth, Dept_No

PROGRAM

mysql> UPDATE Teacher SET Salary=55000 WHERE Teacher_ID=101;

OUTPUT
10. Write a mysql command to find the following using AGGREGATE FUNCTIONS
in Table Teacher. The field names in Teacher table is listed below.
Teacher_ID, First_Name, Last_Name, Gender, Salary, Date_of_Birth, Dept_No

(i) Calculate the sum of salary given to the Teachers and name it as Total_Salary.
(ii) Calculate the maximum and minimum salary of the Teacher and name it as
Max_Salary and Min_Salary.
(iii) Calculate the total number of Teachers whose salary is >40000.
PROGRAM
mysql > SELECT SUM(Salary) AS Total_Salary FROM Teacher;

OUTPUT

PROGRAM
mysql > SELECT MAX(Salary) AS Max_Salary, MIN(Salary) AS Min_Salary
FROM Teacher;

OUTPUT

PROGRAM
mysql > SELECT COUNT(Salary) FROM Teacher WHERE Salary > 40000;

OUTPUT
JAVA
PROGRAM
01. Write a JAVA program to print the string Hello World.

PROGRAM

// Your First Program

public class Helloworld {


public static void main(String[] args) {
System.out.println("Hello World");
}
}

OUTPUT

Output from Helloworld


02. Write a Java program to display character A to Z using for loop.

PROGRAM

public class CharactersAtoZ {


public static void main(String[] args) {
char c;
for(c = 'A'; c <= 'Z'; c++)
System.out.print(c + " ");
}
}

OUTPUT
03. Write a Java program to check if a given Number is Positive or Negative or Zero
using if..else statement by getting the input of a number of user choice during
runtime.

PROGRAM

import java.util.Scanner;
public class PositiveNegativeZero {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("Enter the number: ");
int num = reader.nextInt();
// true if number is less than 0
if (num < 0)
System.out.println(+num + " is a negative number.");
// true if number is greater than 0
else if (num > 0)
System.out.println(+num + " is a positive number.");
// if both test expression is evaluated to false
else
System.out.println(+num + " The given number is zero.");
}
}

OUTPUT
04. Write a Java program to find the largest among three numbers using if..else
statement by getting the input of three number of user choice during run time.

PROGRAM

import java.util.Scanner;
public class LargestOfThree {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("Enter the first number: ");
int n1 = reader.nextInt();
System.out.print("Enter the second number: ");
int n2 = reader.nextInt();
System.out.print("Enter the third number: ");
int n3 = reader.nextInt();
if( n1 >= n2 && n1 >= n3)
System.out.println(n1 + " is the largest number.");
else if (n2 >= n1 && n2 >= n3)
System.out.println(n2 + " is the largest number.");
else
System.out.println(n3 + " is the largest number.");
}
}

OUTPUT
05. Write a Java program to check whether a number is even or odd using if...else
statement by getting the input of a number of user choice during run time.

PROGRAM

import java.util.Scanner;
public class EvenOdd {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("Enter a number: ");
int num = reader.nextInt();
if(num % 2 == 0)
System.out.println(num + " is even");
else
System.out.println(num + " is odd");
}
}

OUTPUT
06. Write a Java program to Generate Multiplication Table (number of iteration
(from 1 to 10)) using for loop of a number by getting the input of a number of
user choice during runtime.

PROGRAM

import java.util.Scanner;
public class MultiplicationTable {
public static void main(String[] args) {
Scanner reader = new Scanner(System.in);
System.out.print("Enter the MultiplicationTable number: ");
int num = reader.nextInt();
for(int i = 1; i <= 10; i++)
{
System.out.printf("%d * %d = %d \n", num, i, num * i);
}
}
}

OUTPUT
07. Write a Java program to find the Area of Rectangle by getting the input of
length and breadth from the user during run time.

PROGRAM

import java.util.Scanner;
public class AreaOfRectangle {
public static void main(String args[])
{
Scanner s= new Scanner(System.in);
System.out.println("Enter the length of the Rectangle:");
double l= s.nextDouble();
System.out.println("Enter the width of the Rectangle:");
double b= s.nextDouble();
double area=l*b;
System.out.println("Area of Rectangle is: " + area);
}
}

OUTPUT
08. Write a JAVA program to print the sum of first 10 natural numbers 1 to 10.

PROGRAM

public class SumNatural {

public static void main(String[] args) {

int i, sum = 0;

for(i = 1; i <= 10; ++i)


{
sum = sum + i;
}

System.out.println("The Sum of first 10 Natural numbers is = " + sum);


}
}

OUTPUT

21
09. Write a Java program to print the FIBONACCI SERIES by getting the input of
number of terms in the series during run time.
0 1 1 2 3 5 8 13 21 34

PROGRAM
import java.util.Scanner;
class Fibonacci
{
public static void main(String[] args)
{
Scanner s=new Scanner(System.in);
System.out.println("Enter number of terms");
int n=s.nextInt();
int num1=-1, num2=1,num3=0;
System.out.println("Fibonacci series is ");
for(int i=0;i<n;i++)
{
num3=num1+num2;
num1=num2;
num2=num3;
System.out.print(num3);
System.out.print("\t");
}
}
}

OUTPUT
10. Write a Java program to print the FACTORIAL of a given number by getting
the input of a number of user choice during run time.

PROGRAM

import java.util.Scanner;
public class Factorial {
public static void main(String arg[])
{
int n,fact=1;
Scanner s=new Scanner(System.in);
System.out.println("Enter a number:");
n=s.nextInt();
for(int i=1;i<=n;i++)
{
fact=fact*i;
}
System.out.println("Factorial of the given number "+n +" is " +fact);
}
}

OUTPUT
OPERATING
WEB BASED
APPLICATION
CASE STUDY
ONLINE BILL CALCULATOR
BOOK RAIL TICKET
How to book train ticket online; step by step guide
Step 1: Visit the IRCTC e-ticketing website: www.irctc.co.in.
Step 2: Login to the IRCTC website by using user id, password
Step 3: You can either login with OTP facility or by entering the captcha code.
If opting the OTP facility, enter the One Time Password (OTP) sent on the
registered mobile number to log in

Step 4: Fill the railway stations between which you wish to travel, ‘source
station’ and ‘destination station’ on the ‘Book Your Ticket’ on the homepage of
the IRCTC website.

Step 5: Enter the date of journey and class of travel.


Step 6: The list of trains available on the selected route will be shown.

Step 7: Enter passenger details such as name, age, gender, food choice, seat
preference, mobile number, preferred coach id (if any). Enter the details of the
child, if travelling with senior citizen / children below 5 years of age.
Step 8: Click on ‘Continue Booking’ again on the review booking page. You may
also book a return ticket.

Step 9: Select the payment method from the options available such as credit
card, debit card, net banking, mobile wallet and pay the required amount on
payment window.
Step 10: Electronic Reservation Slip E- Ticket is generated. Passengers must
carry a copy of this E-Ticket while boarding the Train.
“Avoid printing the paper and save trees and our environment”.

You might also like