INFORMATICS PRACTICES - CLASS - 12

Arithmatics Operators

Design a GUI application that performs arithmetic operations(+,-,* and /).



Calculate Discount

During a special sale at a store, a 10% discount is taken on purchases over Rs. 1000/-. Write a program that asks for the amount of purchases, then calculate the discounted price.



Commission Calculate

Calculate commission for the salesman. The commission is calculated according to following rated:

(a) sales is 30001 onwards so commission rate is 15%.
(b) sales is 22001-30000 onwards so commission rate is 10%.
(c) sales is 12001-22000 onwards so commission rate is 7%.
(d) sales is 5001-12000 onwards so commission rate is 3%.
(e) sales is 0-5000 onwards so commission rate is 0%.



Even No.

Create a GUI application that print Even No



Scoredboard

Design an application for a Football match's Scoreboard. Each team's score should be maintained. Whenever a team scored a goal, it should be reflected on the Scoreboard. When the result is declared, depending upon the scorecard, the winning team shouldd be declared.



If Statement

Design a GUI application having interface as showwn below.



Loop

Design a GUI application having interface as showwn below.



Grade Calculate

Design a GUI application having interface as showwn below.



Background Color Change

Design a GUI application in Netbeans IDE having layout similar to the one shown below:



Chat with your Friends

School from various cities in India have decided to form a network. This network is names as IndicSchoolNet. Apart from connecting teacher and other officials of diffrent school across the country, student can also benefit from this network. One such feature available for student is Chat with your friends wherein a student can chat with other student who are currently logged in the network.



Check Box

Design a GUI application that obtains change color for textbox using click on check box.



FRX Consultancy

FRX Consultancy is registering job seekers for placement. Their basic entry from has following feature.



GCD Calculator

The Given form calculates the GCD of two number.



Human Survey

Department of Human Resources along with Department of Higher Education wants to conduct an online survey of school student time spending habit and thier subject choices. It will help them design a better eduation policy and create better placement.



LCM

The given from calculates the LCM of two number.



Sum Individual

Create an application that receives a number through a text field and prints the sum of its individual digits when the Submit button is pressed as shown in following sketch.



Daily Meel

Design a GUI application that display food type in a combo box and food pertaining to selected type in a list box. Upon selecting a specific food, its details are displayed in a separate dialog.



Platinum Gold Silver

Design a GUI application that obtains the price and quantity of an item, calculates the sale-values, discount and net payble amount. Discount is calculated as 10% of the sale-value.



Building

Design a GUI application having interface as shown below:



Avon Shoe Factory

Seema is a junior programmer at 'Avon Shoe Factory'. She has created the following GUI in Netbeans.



Shiksha Vidyalaya

The students of “Shiksha Vidyalaya” work for different extracurricular activities like ‘Community Outreach Programme’, ‘Swachh Bharat Abhiyan’ and ‘Traffic Safety Club’. The Programmer at the school has developed a GUI application as shown below:



Happy Fun and Food Park

Mr. Rangaswami works at a Recreation Park as a system analyst. He has created the following GUI. when a group arrives at the Recreation Park, the number of people in the group and whether the group wants to enjoy the Water park or not is entered. Entry fees is Rs. 500 per person. The person can choose to play at Water Park by selecting the checkbox. Rides of Water Park will cost Rs. 250 extra per person. (i) On the click of command button ‘Calculate’, textfield for ‘Entry Fees’ should display Entry Fees per person x Number of people. If ‘Water park’ checkbox is selected, textfield for ‘Water Park Charges’ should display Water Park Charges per person x Number of people. Textfield for ‘Total Amount’ should display sum of Entry Fees and Water Park Charges for all the people in the group. (ii) Write Java code to clear all Textboxes on the click of ‘Clear’ button. (iii) Write Java code to close the application on the click of ‘Exit’ button.



Grade Calculator

Aditya is a programmer at Edudel enterprises. He created the following GUI in NetBeans.



SUM Individual

Create an application that receives a number through a text field and prints the sum of its individual digits when the Submit button is pressed as shown in following sketch.



Work With String

Program to illustrate the usage and functionality of following String methods:
(i) length(), (ii) charAt(), (iii) compateTo(), (iv) equals() (v) concat() (vi) indexOf(), (vii) lastIndexOf(), (viii) substring(), (ix) replace(), (x) toLowerCase(), (xi) toUpperCase



Count Character

An application counts the number of vowels in a string. Write the suitable code under the command button to achieve this goal.



Count Vowel

An application counts the number of vowels in a string. Write the suitable code under the command button to achieve this goal.



Palindrom

Program to check whether a string is a palindrome or not.



Replace Word

Write a program to read a sentences and replace the character.



Sentences Case Converter

An application changes first letter of each word in a text box to upper case and displays the modified sentences in the same text box. Write the suitable code under the command button to achive this goal.



Reverse String

Write the suitable code under the command button jButton1 to reverse the input string in text box txtstring and display it in text box txtreverse. The code should not include the StrReverse() library function.

Database Connectivity

Display Record In JTable



Insert The Record



Select The Record From JTable



Update Record from Database



Delete Record From Database



Font Tag



Font Face



Horizontal Rules



Noshade Attribute



Text Style



Special Character



Bullet



Color



Form 1



Form 2



Form 3



Form 4



Form 5



List



Table



Table 1



Table 2



Table 3



Table 4



Table 5



Table 6



Table 7



Table 8



Table 9



Table 10



XML

XML code is just for a knowledge it's not recommend yet board Examination.



String Function

Char()

This function return the character for each integer passed.



Concate()

This function concatenates two strings:



Lower()

This function converts a strings into lowercase:



Upper()

This function converts a strings into uppercase:



Substr()

This function extracts a substring from a given string:



Ltrim()

This function remove leading space from the left of given string:



Rtrim()

This function remove leading space from the right of given string:



Trim()

This function remove leading and trailing spaces from a given string. It performs combined function of LTRIM() and RTRIM():



Instr()

This function searches for given second string into the given first string:



Length()

This function length of given string in bytes:



Left()

This function return the leftmost number of characters as specified:



Right()

This function return the rightmost number of characters as specified:



Mid()

This function return a substring starting from the specified position:





Numeric Function

Mod()

This function return modulus (remainder) of given two numbers



Power()

This function return m^n number m raised to the nth power.



Round()

This function return a number rounded off as per given specification.



Sign()

This function return a number sign of given specification.



Sqrt()

This function return a number square root of given specification.



Truncate()

This function return a number with some digit truncate.





Date and Time Function

Curdate()/ Current_date()

This function return current date.



Date()

This function extracts the date part of a date or datetime expression.



Month()

This function return a month from the date passed



Year()

This function return a yearpart of a date.



DayName()

This function return a name of weekday.



DayOfMonth()

This function return thedaymonth.



DayOfWeek()

This function return the day week.



DayOfYear()

This function return the day year.



Now()

This function return the current date and time.



Sysdate()

This function return the time at which the function executes.





Sql Table

Supplier Table

1. To Display names of the products, whose Pname starts with ‘B’ in ascending order of Price?
2. To Display supplier code, Product name and city of the products whose quantity is less than 150.
3. To count distinct city in the table.
4. To insert a new row in the table Supplier. ‘110’,’Bournvita’,’ABC’,170,’Delhi’,40.00.
5. Select Pname from Supplier where Pname IN(“Bread”, “Maggi”);
6. Select count(distinct (city)) from supplier;
7. Select max(Price) from Supplier where City = “Kolkata”;



Exam Table

1. To list the name of those students, who have obtained Division as FIRST in the acending order NAME?
2. To display a report listing NAME, SUBJECT and Annual stipend received assuming that the stipend column has monthly stipend.
3. To count the number of students, who have either Accounts or Informatics as Subject.
4. To insert a new row in the table Supplier. ‘6’,’Mohan’,500,’English’,73,’SECOND’;
5. Select AVG(Stipend) From EXAM WHERE DIVISION = “THIRD”;
6. Select count(distinct Subject) From Exam;
7. Select Min(Average) From Exam Where Subject = “English”;



Club Table

1. To show all information about the swimming coaches in the club.
2. To list name of all coaches with their date of appointment (DATEOFAPP) in descending order.
3. To display a report, showing coacchname, pay, age and bonus (15% of pay) for all the coaches.
4. Give the output of following SQL statement:
a. SELECT LCASE(SPORTS) FROM CLUB;
b. SELECT MOD(Age, 5) FROM CLUB WHERE SEX = “F”;
c. SELECT POWER(3,2) FROM CLUB WHERE Sports = “KARATE”;
d. SELECT SubStr(CoachName, 1, 2) FROM CLUB WHERE Datofapp> “1998-01-31”;



Student

1. Select all the Nonmdedical stream student from STUDENT1.
2. List all name of those student who are in class 12 sorted by Stipends.
3. List all student sorted by AvgMark in descending order.
4. Display a report, listing Name, Stipend, Stream and amount of stipend received in a year assuming that the Stipend is paid every month.
5. Give the output of following SQL statement:
a. SELECT TRUNCATE(AvgMarks) FROM Student1 WHERE AvgMarks< 75;
b. SELECT ROUND(AvgMarks) FROM Student1 WHERE Grade = ‘B’;
c. SELECT CONCATE(Name, Stream) FROM Student1 WHERE Class = ‘12A’;
d. SELECT RIGHT(Stream, 2) FROM Student1;



Shoppe

1. To Display name of the items, whose name starts with ‘C’ in ascending order of Price?
2. To display Code, Item name and City of the Product whose quantity is less than 100.
3. TO count distinct Company from the table.
4. To Insert a new rows in the table Shoppe. ‘110’,’Pizza Jones’, 120, ‘Kolkata’, 50.0;
5. Select Item from Shoppe where Item IN(“Jam”, “Coffee”);
6. Select Count(distinct (City)) from Shoppe;
7. Select Min(Qty) from Shoppe where City = “Mumbai”;



Result

1. To list the name of those student, who have obtained Division as FIRST in the ascending order of NAME.
2. TO display a report listing NAME, SUBJECT and Annual stipend received assuming that the stipend column has monthly stipend.
3. To count the number of students, who have either Accounts or Informatics as Subject.
4. To insert a new row in the table EXAM: 6,’MOHAN’,500,’ENGLISH’,73,’SECOND’;
5. SELECT AVG(Stipend) FROM RESULT WHERE DIVISION = “THIRD”;
6. SELECT COUNT (distinct Subject) FROM RESULT;
7. SELECT MIN(Average) FROM RESULT WHERE Subject = “English”;



Grouping Function

Emp Table

I. AVG : This function computes the average of given data.
II. COUNT : This function counts the number of rows in a given column or expression.
III. MAX : This function return the maximum value from a given column or expression.
IV. MIN : This function return the minimum value from a given column or expression.
V. SUM : This function return the sum value from a given column or expression.

Grouping Function

a. Group By: The GROUP BY statement is used in conjunction with the aggregate functions to group the result-set by one or more columns.
b. Nested Group: The GROUP BY clause, you can create group within group. Such type of grouping is Nested Grouping.


Having Clause

The HAVING clause was added to SQL because the WHERE keyword could not be used with aggregate functions.



Dept Table

Join Table

i. Equi join In an equijoin, the values in the columns being joined are compared for equality. All the columns in the tables-being are included in the results. Consider the following example. In equi-Join, all the column from joining table appear in the output even if they are identical.
ii. Non-Equi join The comparison operator used in the join condition in equals sign “=”. Such join queries are called equi-joins. A non-equi-join is a query that specifies some relationship other than equality between the columns.
iii. Natural join Be definition, the result of an equijoin contain two identical column. One of the two identical columns can be eliminated by restating the query. This result is called a Natural Join (Equi Join minus one of the two identical column).
v. Left join When using LEFT JOIN all rows from the first table will be returned whether there are matches in the second table or not. For unmatched rows of first table, NULL is shown in columns of second table.
vi. Right join Right Join word just like the left join but with table order reversed. All rows from the second table are going to be returned whether or not there are matches in the first table. Right join is produced in the same manner as that of left join, just you need to replace the keyword LEFT with RIGHT.



Table
I. Customer Table
II. Parts Table
III. Order Table

1. Find Out Cartesian product of Orders and Parts i.e. Order * Parts.
2. What will be the equi join of tables orders, parts?
3. Determine the total order amount for part ‘Road Bike’.
4. Find Out order details of parts having description like ‘Road………’.



Table
I. Item Table
II. Brand Table

1. To Display Item_Code, Item_Name and corresponding Brand_Name of those Items whose Price is between 20000 and 40000.
2. To Display Item_Code, Price and Brand_Name of the Item, Which has Item_Name as “Computer”.
3. To increase the price of all the Items by 10%.  Update Item set Price = Price + Price * 0.10;



Table
I. Item Table
II. Customer Table

1. To Display the details of Item, whose Price is in the range of 40 and 95.
2. To Display the CustomerName. City from table Customer, and ItemName and Price from table Item, with their corresponding matching ID.
3. To Increase the Price of all the Product by 50.  UPDATE Item SET Price = Price + 50;



Table
I. Employee Table
II. Dept Table

1. Identify the foreign key in the table Employee.
2. What output, you will get, when an equi-join query is executed to get the NAME from Employee Table and corresponding DNAME from Dept table?



Patient Table

1. Identify the Primary key in the table given above.
2. Write a MySql query to add a column Department with data type varchar and size 30 in the table Patient.



Club Table

1. SELECT COUNT(DISTINCT SPORTS) FROM Club;
2. SELECT MIN(Avg) FROM CLUB WHERE Sex = ‘F’;
3. SELECT AVG(Pay) FROM CLUB WHERE Sports = ‘KARATE’;
4. SELECT SUM(Pay) FROM CLUB WHERE Datofapp > ‘31/01/98’;



Student Table

1. SELECT MIN(AvgMarkS) FROM STUDENT WHERE AvgMarkS < 75;
2. SELECT SUM(Stipend) FROM Student WHERE Grade = ‘B’;
3. SELECT AVG(Stipend) FROM Student WHERE Class = ‘12A’;



Library Table

1. SELECT MIN(Price) FROM Library Where Price < 150;
2. SELECT AVG(Price) FROM Library WHERE Qty < 3;



Mov Table

1. SELECT AVG(Price) FROM Mov WHERE Price < 30;
2. SELECT MAX(Price) FROM Mov WHERE Price > 30;
3. SELECT SUM(Price * Qty) FROM Mov WHERE QTY < 4;
4. SELECT COUNT(DISTINCT Type) FROM Mov;



Table
I. Item Table
II. Brand Table

1. To display ICode, IName and corresponding Brand of those Itemss, whose Price is between 20000 and 45000.
2. To display ICode,Price and BName of the Item, which has IName as ‘Television’.
3. To increase the price of all the Items by 15%.



Table
I. Product Table
II. Client Table

1. To display the details of Product whose Price is in the range of 40 and 120.
2. To display the ClientName, City from table Client and ProductName and Price from table Product, with their corresponding matching P_ID.
3. To increase the Price of all the Product by 20.



Table
I. Member Table
II. Division Table

1. Identify the foreign key in the table Member.
2. What output, you will get, when an equi-join query is executed to get the NAME from Member Table and corresponding from Division table?



Table Constraint

Product Table

Write MySql command to create the Table Product including its Constraints



Customer Table

Write MySql command to create the Table Customer including its Constraints



Department Table

Write MySql command to create the Table Department including its Constraints



Employee Table

Write MySql command to create the Table Employee including its Constraints



Payment Table

Write MySql command to create the Table Payment including its Constraints