01 QP-SP-1-IP-01
01 QP-SP-1-IP-01
01 QP-SP-1-IP-01
4e The following code has some errors. Rewrite the correct code underlying all corrections. 2
int I,j=5;
I==j+5;
if(i=j)
{ jTextField1.setText(“I & j are equal”);
{
jTextField2.setTeaxt(“They are not equal”);
}
4f The students of “Shiksha Vidyalaya” work for different extracurricular 6
activities like‘community Outreach Program’, ‘Swachh Bharat Abhiyan’ and ‘Traffic
Safety Club’. The Programmer at the school has developed a GUI application as shown
below:
• A student can participate in more than one activities.
• Each student gets 10 points for each activity- namely Community Outreach
Programme, Swachh Bharat ABhiyan and Traffic Safety Club.
Help the programmer to write code for the following:
(i) When ‘Calculate Total Score’ button is clicked, the points for each activity
(that is selected) should be displayed in the text field in from of that
activity’s checkbox and theTotal score should be displayed in the
appropriate Text field.
(ii) When Clear button is clicked, all the Textfields and Checkboxes should be
cleared.
(iii) When Stop button is clicked, the application should close.
5a While creating a table named “Student”, Mr Ashok got confused as which datatype he 2
should choose for the column studentname out of char and varchar. Help him in choosing
the right data type to store employee name. Give valid justification for the same.
5 Shuchi has just created a table Customer containing columns Customer, City, Product. 2
b After creating the table she realized that she has forgotten to add a column phoneno.
Help her in writing SQL command to add one more attribute.
5c Consider the following table :
EMP 4
Empid Ename Desig Salary
1001 Arun Manager 80000
1002 Vishal Salesman 20000
1008 Babita Manager 70000
1004 Sagnick Analyst 81000
1003 Arindam Salesman 30000
Write commands in SQL for (i) to (iv)
i) To display the details of those who are Managers by designation.
ii) To display the details of those whose name starts with ‘A’.
iii) To increase the salary of all salesman by 2000.
iv) To display the names of those whose salary is less than 50000.
5 Give the output based on the above table: 2
d i) Select Max(Salary), Min(Salary) from EMP;
ii) Select Ename from EMP where Desig IN(‘Analyst’, ‘Manager’);
6a Create a table ITEMS with the following attributes: 2
Field name Data Type Size Constraint
ItemId Integer 5 Primary Key
IName Varchar 25
IDescp Varchar 35
PurchaseDate Date
6 Consider the following Tables
b DOCTOR 2
D-ID D_NAME ADDRESS
D01 R P CHOWDHURY 2ND MILE
D02 A DASGUPTA MATIGARA
D03 VIKAS AGARWAL SHIV MANDIR
PATIENT
P_NO P_NAME DEPT D_ID
P01 ANITA SURGERY DO1
P02 VINITA ORTHO DO2
P03 NITIN SURGERY D01
P04 MUKESH ENT D03
P05 RAMESH ENT D03
I) Identify the foreign key in the table PATIENT.
II) How many rows and columns will be there in the Cartesian Product of the two
tables.
6c Write the SQL queries based on the above tables. 6
i) To display the P_NAME, DEPT and D_NAME.
ii) To display the name of Doctors who deal with surgery.
iii) To sort the PATIENT table in alphabetical order of P_NAME
7a Write down two benefits of cashless transactions. 2
7 Write the name of two major websites for e-learning 1
b
7c Mr Shubham works in Education Department. He wishes to create controls on Form to 2
collect student information.Write the name of appropriate controls which he can use for
it.
Sl No Control used to Control
1 Enter name ?
2 Select Gender (Male/Female) ?
3 Select Class & sec ?
4 Submit the Form ?