gist of the practical/step suggested for the practical:- · 2017-09-30 · gist of the...

22
Gist of the Practical/Step Suggested for the practical:- Q1. Sr. No. Gist/Steps suggested 1 Objective : Design a GUI application in which the user enters a number in the text field and on clicking the button the sum of the digits of the number should be displayed in a label. 2 3 Write the code on the button. 4 Compile and run with shift+F6. 5 Check the compile and run time errors. 6 If correct output write the code on practical record.

Upload: others

Post on 19-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Q1.

Sr. No. Gist/Steps suggested

1 Objective : Design a GUI application in which the user enters a number

in the text field and on clicking the button the sum of the digits of

the number should be displayed in a label.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 2: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. List/steps suggested

1 Objective: Design a GUI application to accept a String from the user in

a text field and print using option pane whether it is a palindrome

or not

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 3: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: Design a GUI application to accept the cost price and

selling price form the user in two text fields then calculate the

profit or loss incurred.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 4: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:

Sr. No. Gist/steps suggested

1 Objective: Design a GUI application to accept a character in a text field

and print in a label if that character is a vowel: a, e, i, o, or u. The

application should be case sensitive.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 5: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: Design a GUI application that repeatedly accepts numbers

in a option pane and once the typed number is 0 the maximum and

minimum of all numbers typed are displayed.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 6: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Sr. No. Gist/steps suggested

1 Objective: Design a GUI application in java to convert temperature

from Celsius to Fahrenheit or vice versa using radio buttons and two

text fields

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 7: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: 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. The

purchase amount will be input in Rs. :

Enter amount of purchases : 2000

Discounted price : 1800

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 8: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: FRX consultancy is registering job seekers for placement. Their basic

entry proforma has following features :

(a) All the characters entered in textfield should be converted into

uppercase characters.

(b) When submit button is clicked the following things should happen :

1. Post Graduates, Graduate, Intermediate checkboxes get selected.

2. A message should display “Hello Mr…………. you are registered” for male

and “Hello Miss………….. you are selected”.

(c) When clear button is clicked the textbox, checkboxes and the option

button should

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 9: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: Create a GUI application to accept a string and display it in reverse order using the substring() method.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 10: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Create a GUI application to accept 3 numbers in separate text

fields and display their sum, average, maximum or minimum

after rounding the results on the click of appropriate buttons

(There are four separate buttons - one for sum, one for average,

one for maximum and one for minimum). The result should be

displayed in the fourth text field

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 11: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: Create an application to accept two strings - First Name and Last name from the use and display the message Welcome with the complete name of the user.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 12: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Create an application to accept the radius of a circle, calculate the area and circumference and display the results in a message box after rounding off the areaand circumference to an integer number.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 13: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Modify application to make sure that the user has not input the complete name in

the first name text field. 2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 14: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: Modify the SMS application developed in Chapter 5 to store the messages in a table

along with the number of characters in a message. 2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 15: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: To create an application that calculates

the power of a number.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 16: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Create an application to round off a number.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 17: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective : To combine first name, middle name and last

name and display it in short form.

2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 18: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: To create an application to calculate

the number of characters and remaining

characters types by the user. 2

3 Write the code on the button.

4 Compile and run with shift+F6.

5 Check the compile and run time errors.

6 If correct output write the code on practical record.

Page 19: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Sr. No. Gist/steps suggested

1 Objective: Consider a database LOANS with the

following table and write queries and results for

the following statements

2

3 Create table

4 Insert data into table

5 Write the queries

6 If correct output write the query in practical record.

Page 20: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

a) Based on these tables write SQL statements for the following queries: i. Display the lowest and the highest classes from the table STUDENTS. ii. Display the number of students in each class from the table STUDENTS. iii. Display the number of students in class 10.

b) Identify the Foreign Keys (if any) of these tables. Justify your choices.

c) Predict the the output of each of the following SQL statements, and then verify the

output by actually entering these statements: i. SELECT class, sec, count(*) FROM students GROUP BY class, sec; ii. SELECT Game, COUNT(*) FROM Sports GROUP BY Game;

Sr. No. Gist/steps suggested

1 In a database create the following tables with

suitable constraints

2

3 Create table

4 Insert data into table

5 Write the queries

6 If correct output write the query in practical record.

Page 21: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

a) Based on these tables write SQL statements for the following queries: i. Display the average rate of a South Indian item. ii. Display the number of items in each category.

b) Identify the Foreign Keys (if any) of these tables. Justify your answer

c) Answer with justification (Think independently. More than one answers may be correct. It all depends on your logical thinking):

i. Is it easy to remember the Category of item with a given item code? Do you find any kind of pattern in the items code? What could be the item code of another South Indian item?

Sr. No. Gist/steps suggested

1 In a database create the following tables with

suitable constraints : 2

3 Create table

4 Insert data into table

5 Write the queries

6 If correct output write the query in practical record.

Page 22: Gist of the Practical/Step Suggested for the practical:- · 2017-09-30 · Gist of the Practical/Step Suggested for the practical:- Sr. No. Gist/steps suggested 1 Objective: Design

Gist of the Practical/Step Suggested for the practical:-

Write the output that will be displayed due to last SQL SELECT

statement:

mysql> START TRANSACTION;

mysql> INSERT INTO BILLS VALUES(7,'C101','2010-09-02',5000);

mysql> UPDATE BILLS SET Bill_Amt = Bill_Amt+500 WHERE

Order_Num = 3;

mysql> SAVEPOINT A;

mysql> INSERT INTO BILLS VALUES(8,'C97','2010-09-03',4500);

mysql> DELETE FROM BILL WHERE cust_code = 'C105';

mysql> ROLLBACK TO A;

mysql> SELECT * FROM bills;

Now verify the output by actually executing the statements.

Sr. No. Gist/steps suggested

1 A table named Bill has the following rows:

2

3 Create table

4 Insert data into table

5 Write the queries

6 If correct output write the query in practical record.