Professional Documents
Culture Documents
It Project
It Project
➢ TABLE EMPLOYEE:-
Employee_ID Employee_Name Job_Title Salary Bonus Age Manager_ID
1201 Divya President 50000 NULL 29 NULL
1205 Amyra Manager 30000 2500 26 1201
1211 Rahul Analyst 20000 1500 23 1205
1213 Manish Salesman 15000 NULL 22 1205
1216 Megha Analyst 22000 1300 25 1201
1217 Mohit Salesman 16000 NULL 22 1205
Primary key- Employee_ID
Foreign key- Manager_ID
SQL COMMANDS:-
1. Create above the table:
CREATE TABLE EMPLOYEE
(Employee_ID Integer Primary Key,
Employee Name Varchar(15),
Job Title Varchar(12),
Salary Decimal(10,2),
Bonus Integer,
Age Integer,
Manager_ID Integer Foreign Key );
5. Alter the table Employee so that NULL values are not allowed for
age column:
ALTER TABLE Employee
ADD CONSTRAINT Age
NOT NULL;
10. Query to display Employee Name and Job Title of the employees
whose manager is “Amyra”:
SELECT EmployeeName, Job Title
FROM Employee
WHERE Manager=”Amyra”
11. Query to display the Employee Name and Job Title of employees
aged between 26years and 30years (both inclusive):
SELECT Employee Name, Job Title
FROM Employee
WHERE 26<=Age>=30
➢ RAILWAY COMPANY DETAILS:-
SQL Commands:-
CREATE Sales
(Machine_ID CHAR(3)
Date DATE
Tickets_Sold INTEGER
Income DECIMAL(8,2)
Primary key (Machine_ID , Dates));
•
• Web page opens.
• For booking a ticket, you need to have an account on the IRCTC
website. If you already have an account in IRCTC, then type your
username and password and login.
• If you are not an existing user, you need to create your account.
You need to sign up on the IRCTC website, to perform any
transaction.
• Once your account has been created, now you can perform
transactions.
• Now to book the ticket:-
• On the “Plan My Travel” box on the left side of the page, enter the
details, i.e. the start station, end station, date on which you want
to travel, ticket type (e-ticket) and your quota. Next, click on <Find
Trains>.
• A list of available trains with information about availability of
tickets will be displayed.
• Now fill all the entries as per your requirements.
• After you have checked the fares and you are ready to book a
ticket, click on <book>.
• Enter the detail of the persons for whom you are booking the
tickets, like, name, age, sex, birth/seat preference (lower, middle,
upper), and check the box, if you are a senior citizen.
• Once you have filled in the details press <enter>, the page
showing your booking details will be displayed.
• Once your payment is done using any mode of payment such as
debit card, credit card, etc, you can view your ticket.
• An electronic copy of your paid ticket is shown on the screen.
Also, your ticket will be e-mailed to you at the email address you
have specified in the registration form.
ONLINE SHOPPING
Online shopping is an e-commerce application where the customer
can purchase goods over the Internet.
➢ Explore the following sites for online shopping:-
AMAZON.COM
Amazon is a multinational American company which focuses on e-
commerce which allow us to shop a vast varieties of goods in some
discounted rates and different payment options.
HOMESHOP 18.COM
Output: a%b= 10
II. a/=b
public class Divide and Assignment
{
public static void main(String[]args)
{int a=20, b=30,a;
a= a/=b;
System.out.println(“ a/=b is”);
}}
Output:- a=a/=b = 0
III. (a+b*100)/10
public class Operator
{
public static void main(String[]args)
{int a=20, b=30, Num;
Num= (a+b*100)/10;
System.out.println(“Num=(20+30*100)/10”);
}}
IV. a&&b
public class Nested if
{
public static void main(String[]args)
{int a=20, b=30, a&&b;
If (a<b) and (a=a+b>b)
System.out.println(“true”);
else
system.out.println(“false”);
}}
Output:- true
V. a++
public class Increment
{
public static void main(String[]args)
{int a=20,num;
Num=a++
System.out.println(“Num=”);
}}
Output: - 21
Output:- s=
➢Program to enable user to handle divide by
zero exception:-
public class Handle by Zero Exception
{
public static void main(String[]args){
try
{int a!=0, b=0,Num;
Num= a/b}
catch( Arithmetic exception e)
{ System.out.println(“e”);
}
{System.out.println(“rest of the code”);
}
}