0% found this document useful (0 votes)
435 views49 pages

Informatics Practices

This document contains 3 assignments related to hardware concepts, software concepts, and getting started with programming using IDEs. It includes very short answer questions and short answer questions. The very short answer questions generally ask for definitions, examples, or short explanations. The short answer questions tend to be more in-depth, asking about explaining concepts, differentiating between terms, outlining processes, or describing in more detail. Overall, the document covers fundamental topics in computer hardware, software, programming, and integrated development environments.

Uploaded by

Cornelius Cruz
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)
435 views49 pages

Informatics Practices

This document contains 3 assignments related to hardware concepts, software concepts, and getting started with programming using IDEs. It includes very short answer questions and short answer questions. The very short answer questions generally ask for definitions, examples, or short explanations. The short answer questions tend to be more in-depth, asking about explaining concepts, differentiating between terms, outlining processes, or describing in more detail. Overall, the document covers fundamental topics in computer hardware, software, programming, and integrated development environments.

Uploaded by

Cornelius Cruz
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/ 49

Assignment No.

1
HARWARE CONCEPTS
TYPE A: VERY SHORT ANSWER QUESTION
1. What is a computer? Name functional components of a digital computer?
2. What is the function of main memory? What are the measuring units of memory?
3. What do you mean by terms Hardware, software & firmware?
4. What are the functions of operating system and language processor? Give examples of

each.
5. What is Assembler, Compiler and Interpreter.
6. What do you understand by application software?
7. Write full forms of:

1. VDU
5. MICR
2. OMR
6. LCD
3. DMP
7. CRT
4. CD-ROM
8. DVD
8. What is the advantage of non-impact printers over impact printers?
9. Out of following devices, write whether they are input devices, output devices or

storage devices. Also write their function.


1. Light pen

2. Flatbed plotter

3. Joystick

4. OMR

5. Web camera

6. Optical Disk

7. Magnetic Disk

8. MICR

10. What are the two types of RAM? Name various types of ROMs. Write their names in full

forms.
11. What is communication bus? What are its types?
12. What is a port? Name some ports types briefly.
13. Name two ports that allow wireless connection of devices.

TYPE B: SHORT ANSWER QUESTIONS


1.

What are characteristics and limitations of Computers?

2.

What is the function of CPU in a computer system? What are its subunits?

3.

Draw a block diagram of the main units of a computer hardware system and
explain its functionality.

4.

What are the software classifications? Discuss their functioning in brief.

5.

How are computers classified? How are they different from one another?

6.

What do you understand by the term Super Computers? Give the name of super
computers installed in India.

7.

What are RAM and ROM? How are they alike? How are they different?

8.

What is MICR? What are the advantages and disadvantages of MICR?

9.

How is Optical Character Recognition (OCR) used for data input? What are the
advantages and disadvantages of OCR?

10. What do you mean by Storage Devices? Describe the function of Hard Disk with a

diagram.
11. Write brief notes on each of the following types of printer. Make clear the differences

between them in terms of speed, cost and method of operation and suggest suitable
application.
o

Inkjet printer

Dot matrix printer

Laser printer

12. How may he following be used:

A track ball
A light pen
A graphic tablet
A touch screen
13. Briefly explain and differentiate between

(a) Data & information

(b) Input & Output unit

(c) Impact printer & Non-Impact printers (d) VDU & LCD
(e) Hardware & Software

(f) Inkjet & Laser Printer

(g) Plotter & Printer

(h) Analog & digital Computers

(i) CPU & ALU

(j) OCR & MICR

(k) Magnetic Disk & Optical Disk

(l) Serial & Parallel Port

14. What is Bus? Explain its type?

How they are different to each other?

15. Why do you think USB ports are popular these days?
16. What is a memory card? Discuss briefly its types.

Assignment No. 2
SOFTWARE CONCEPTS

TYPE A: VERY SHORT ANSWER QUESTION


1.

What is Program and Software package?

2.

What are two categories of system software?

3.

What is an Operating system? What is its role? Name some commonly used
Operating systems.

4.

What is application software? What are three categories of application software?

5.

What is an IDE? What are developer tools?

6.

Define the following.

1. Spam
2. Malware
4. Firewall
5. Digital Signature
TYPE B: SHORT ANSWER QUESTIONS

3. Phishing
6. Digital
Certificate

1.

What is system software? What role does it play in the functioning of the computer?

2.

What is Operating System? Why it is called Resource Manager? Explain its functions.

3.

Differentiate the followingi.

Multiprogramming OS & Multiprocessing OS

ii.

Time sharing OS & real time OS

iii.

Compiler & Interpreter

iv.

Spyware & Adware

4.

What is Utility software? Discuss the role of utility software in the context of
computer performance and tuning.

5.

How is backup utility useful? Is it necessary to take backup of data?

6.

What is a computer virus? How can it affect your computer?

7.

Why are antivirus software considered important

8.

What do you mean by System Security? What are different types of threats to
computer security?

9.

What are Malware? What types of damages can they cause to your computer?

10. What is Virus? Explain its types?


11. What is a Spam? How it is different from virus?
12. What do you understand by PC intrusion?
13. What measure would you take to avoid various types of threats?
14. What is denial-of-service (DoS) and sweeper attacks?

Assignment No. 3
GETTING STARTED WITH PROGRAMMING USING IDE
TYPE A: VERY SHORT ANSWER QUESTION
1.

What is byte code?

2.

Describe Java compilation? How it is different from ordinary compilation process?

3.

How is Java byte code executed?

4.

What is RAD? How it facilitates programmer to develop an application.

5.

What are containers and child controls?

6.

What happens to container control and its child controls if you delete the container
control

TYPE B: SHORT ANSWER QUESTIONS


1.

Java is both a programming language and a platform. Comment on the statement.

2.

Write a brief history of the Java.

3.

What is the role of JVM ? How byte code makes a Java program platform independent?

4.

What are different characteristics of Java?

5.

Define the Event, message and method? How they are interrelated?

6.

Name at least 3 commonly used swing controls. Also give some of their
properties and methods.

7.

Sketch a screen shot of NetBeans IDE and Name the various components.

8.

Make a list Swing Containers and Swing Controls available in Palatte. Also write their
use.

9.

Write the steps to perform the following(i)

How to start a new project in NetBeans IDE.

(ii)

How to add a Frame.

(iii)

How to add TextField and Push button control on a form.

(iv)

How to change text, font and forecolor properties.

(v)

How to change the name of the push buttons to DisplayButton and of text
field to dispTextField.

How to change the caption of push button to Display


Message. (vii)Write down the TODO code/command for :
a. On clicking the Display Message button, dispTextField text field should
display the message Welcome in JAVA world.
(vi)

b.

Close the application.

(viii) How to run the application.

Assignment No. 4
PROGRAMMING FUNDAMENTALS
TYPE A: VERY SHORT ANSWER QUESTION
1.

Name the character set supported by Java.

2.

What is meant by token? Name the tokens available in Java.

3.

What are keywords? Can keywords be used as identifiers?

4.

What is an identifier? What is the identifier forming rule of Java?

5.

Is Java case sensitive? What is meant by the term case sensitive?

6.

Which of the following are valid identifiers and why/why not?


Data_rec, _data, 1 data, data 1, my.file, asm, switch, goto, break

7.

What is use of .setText() and .getText() methods ?

8.

What is an integer constant? How Octal and Hexadecimal integers are represented in
Java.

9.

What kind of program elements are the following: 13, a, 4.38925, a, main() ?

10. What kind of constants are the following: 14, 011, 0X2A, 17, 014, 0XBC1, 2.50 ?
11. What is a character constant in Java? How are nongraphic characters represented in Java?
12. Which escape sequences represent the newline character & null character?
13. What is floating constant in Java? How many ways can a floating constant be

represented?
14. Write the following real constants into exponent form: 23.197, 7.214, 0.00005, 0.319.
15.

Write the following real constants into fractional form: 0.31E04, 0.471E-04, 0.4E-05.

16. What are binary operators?

Give examples of arithmetic binary operators.

17. Convert the 35, 30, 56 decimal numbers into its Binary form.
18. Convert the 010011 , 1010110, 01100011 into its Decimal form.
19. What

will be the result of a =5/3 if a is (i) float

(ii) int?

20. Assuming that res start with the value 25, what will the following code fragment print

out?
System.out.println ( res-- ) ;
System.out.println
(++res) ;
21. What

will be the value of j = - - k + 2*k + ( l = k, l++) if k is 20 initially ?

22. What

will be the value of P = P* ++ J where J is 22 and P = 3 initially?

23. What

will be the value of following, if j = 5


initially? (i) (5* ++ j) % 6 (ii) (5*
j++)%6

24. What

will be the result of following expression if (i) age =25 (ii) age =65 (iii)
age =85 ? age > 65 ? 350 : 100.
25. What will be the result of following expression if (i) ans =700, val =300 (ii) ans
=800,val =700 ? ans - val < 500 ? 150 : 50
26. Write equivalent Java expressions for the following expressions :
(i) ut + ft2 (ii) |a| + b >= |b| + a (iii) [(3x +5y / 5x +3y) - (8xy/2xy)]3/2 (iv) e|2x^2 4x|
27. What is meant by implicit and explicit type conversion?
28. What do you mean by type casting? What is

type caste operator?

29. What

will be the resultant type of the following expressions if bh represents a byte


variable, i is an int variable, fl is a float variable and db is a double variable?

(i)

bh i + db / fl - i * fl + db / i (ii) (int) (fl + db)

30. Which class is used for using different mathematical methods in Java program?
31. The modulus operator (%) can be used only with integer operands. True/False?
32. The range of values for the long type data is
33. Which of the following represent(s) a hexadecimal number?

(a) 570

(b) (hex) 5

(c) 0X9G

(d) 0X5

34. Which of the following assignments are invalid?

(a) float x =123.5

(b) long m =23

(c)int n =(int) false (d) double y =0X756

35. The default values of char type variable is ..


36.

The result of the expression 13 & 25 will be .

37. The result of the expression 9|9


38. Which of the following

(a) Math.ceil(x)

will produce a value of 22 if x =22.9?

(b)Math.round(x)

39. Which of the following

(a) Math.floor(x)

(c)Math.abs(x)

(d)Math.floor(x)

will produce a value of 10 if x =9.7 ?

(b) Math.abs(x)

(c) Math.round(x)

(d) Math.ceil(x)

TYPE B: SHORT ANSWER QUESTIONS


1.

What are literals in Java ? How many types of literals are allowed in Java ?

2.

What are data types? Make a list of primitive data types with size, initial values and
range of values available in Java.

3.

Explain various types of operators in Java. What is meant by operator


precedence and associatively?

4.

What do you mean by parsing? Name some parsing methods available in Java.

Assignment No. 5
FLOW OF CONTROL
TYPE A: VERY SHORT ANSWER QUESTION
1.

What is null statement? What is its use?

2.

What are the three programming constructs that governs statement flow?

3.

In a nested-if, how does the default matching of dangling else take place?

4.

What is the significance of a break statement in a switch statement? What will


happen if a break is missing in a switch statement?

5.

Write one limitation and one advantage of a switch statement?

6.

What is the significance of default clause in a switch statement? Can two case
labels in a switch have identical values?

7.

Which elements are needed to control a loop?

8.

Write a for loop that displays


(1)

the numbers from 51 to 60.

(2)

Even numbers from 1 to 100.

(3)

Numbers divisible by 5 from 1 to 100.

(4)

Numbers from 50 to 10.

9.

What is variable? What is meant by a variables scope?

10.

What does continue statement in a loop constructs, if used?

TYPE B: SHORT ANSWER QUESTIONS


1.

2.

Compare the following


(1)

if and a ? : Operator.

(2)

while and do.. while loop

(3)

Entry controlled and Exit controlled loop.

(4)

Sentinel and Counter controlled loop.

Given the following code fragment:


if (a==0)
System.out.print ln (Zero);
if (a==1)
System.out.print ln (One);
if (a==2)
System.out.print ln (Two);
if (a==3)
System.out.print ln (Three);

Write an alternative code (using if) that saves on number of comparisons.

3.

Rewrite the following fragment using switch:


if (ch== E)
eastern++ ;
if (ch== W)
western++ ;
if (ch== N)
northern++ ;
if (ch== S)
southern++ ;
else
unknown++ ;

4.

Write the syntax and purpose of a switch statement.

5.

When does an if statement prove more advantageous over a switch statement?

6.

Why is it suggested to put a break statement after the last case statement in a switch
even though it is not needed syntactically?

7.

Rewrite the code given in question 3 using switch?

8.

Reweite the following set of if-else statements in terms of switch-case statements :


(a) char code ;

code = character.readChar();
if (code == A)
System.out.print ln (Accountant);
else if (code == C ll code == G)
System.out.print ln (Grade IV);
else if (code == F)
System.out.print ln (Financial Advisor);
(b) int inputnum, calcval;

If
(inputnum == 5)
{
calcval = inputnum * 25 20 ;
System.out.print ln (inputnum + calcval);
}

else if (inputnum ==10) {


calcval = inputnum * 25 20
System.out.print ln (calcval inputnum);
}

9.

How many times are the following loops executed?


(a) x = 5 ; y = 50 ;
while(x <= y) {
x = y/x ;
............

(b) int m = 10, n= 7;


while(m % n >= 0) {
.......
m = m + 1;

n = n + 2;
.............}

10.

Given the following code fragment :


i = 100 ;
while (i > 0)

System.out.print ln( i--);


System.out.print ln(Thank you);
Rewrite the above code using a dowhile loop.
11.

Rewrite the following code using while loop


int sum = 0;
for (int i = 1 ; i <= 5 ; ++i) {
sum = sum + c;
}

12.

Rewrite following while loop into a for loop


int stripes = 0;
while (stripes <= 13) {
if (stripes %2 == 2)
{ System.out.print ln(Colour code Red);
}
else {
System.out.print ln(Colour code Blue);
}
System.out.print ln(New Stripe);
stripes = stripes + 1;
}

13.

Rewrite following code using either while or do-while loop or both loops.
for(int i = 1 ; i < 4 ; ++i) { for(int
j = 3 ; j > 0 ; --j) {
System.out.print(### . .);
}
System.out.print ln();

}
14.

Find the output of the following code fragments ?

(a) int s = 14;

(b) int s = 14;

if(s<20)

if(s<20)

System.out.print(Under);

System.out.print(Under);
else {
System.out.print(Over);
System.out.print ln(the limit);
}

else
System.out.print(Over);
System.out.print ln(the limit);
(c) int s = 94; If
(s < 20) {
System.out.print(Under);
}
else {
System.out.print(Over);
}
System.out.print ln(the limit);
15.

What will be the output of the following code fragment when the value of ch is
(a) A
switch (ch)

(b) B

(c) D

(d) F

case A : System.out.print ln (Grade


A); case B : System.out.print ln
(Grade B); case C : System.out.print
ln (Grade C);
break;
case D : System.out.print ln (Grade D);
default : System.out.print ln (Grade F);
}
16.

Predict the input of following code fragment:


(a) int i, j, n;
n=0; i=1;
do {

(b) int i=1, j=0, n=0;


while (i<4) {
for(j=1; j<=I; j++) {

n++; i++;

n+=1;

} while (i<=5);

}
i=i+1;
}
System.out.print ln(n);

(b) int i=3, n=0;


While (i<4) {
n++; i--;
}
System.out.print ln(n);

(d) int j=1, s=0;


while(j<10) {
System.out.print(j+ +);
s=s+j;
J=j+j%3;
}
System.out.print ln(=+s);

17.

(a) m=1;
n=0;
for(;m+n<19;++n)
System.out.print ln(Hello \n);
m=m+10;

(b) while(ctr !=10) ; {


ctr=1;
sum=sum + a;
ctr=ctr + 1;
}

(c) for(a=1, a>10; a=a+1)


{...........
}
18.

Identify the possible error(s) in the following code fragment : Discuss the
reason(s) of error(s) and correct the code.
:
f = 1;

for (int a= 40; (a); a--) f*=a;


:
s=0;
for (int a = 1; a<40/a++) s
+= a;
19. Identify the possible error(s) in the following code fragment. Discuss the reason(s)
of error(s) and correct the code.
while(i< j)
System.out.println(i * j);
i++ ;
20. Identify the possible error(s) in the following code fragment. Discuss the
reason(s) of error(s) and correct the code.
while (i<j); {
System.out.println (i * j );
i++ ;
}

Assignment No. 6
JAVA GUI PROGRAMMING USING SWING - I
TYPE A: VERY SHORT ANSWER QUESTION
1.

What is GUI programming? How Event-Driven methodology facilitates GUI


programming.

2.

How is swing related to GUI programming?

3.

What is container component? How it is different from component controls?


Name some top level container controls.

4.

What is an event? What is event handler?

5.

What is default layout manager for a frame and for a panel?

6.

What is the default name of action event handler of a button namely TestBtn?

7.

Name some commonly used properties of (i) jFrame (ii) jPanel

8.

What property would you set to assign access key to a button?

9.

Which method can programmatically performs the click action of a push button?

TYPE B: SHORT ANSWER QUESTIONS


1.

What are various categories of swing controls? Give some examples for each of them.

2.

What is Event Handler/Listener? Discuss major types of Events in Swing controls.

3.

Discuss briefly about different layout managers offered by swing API?

4.

Suggest the layouts for the following scenarios.


(i)

A space hungry components is to be added at the centre of the frame.

(ii)

Components should appear in a row.

(iii)

Components should appear in rows & columns.

5.

How does java handle events?

6.

What are top level containers? What is their significance?

7.

Explain some commonly used properties and methods of jButton control.

8.

Write the steps/commands to do the following(1)

To set the iconImage as abc.png file for JFrame.

(2)

To set the cursor type as Hand cursor for a Jframe.

(3)

To set the title as My First Java application displayed at title bar of a window.

(4)

To set Line Border of jPanel.

(5)

To activate Close action on X button of the frame/window.

(6)

To set the HTML command to display PRINT as text of a jButton1 in Bold style.

(7)

To set the Access Key ALT+P for jButton1 having text PRINT.

(8)

To set the underline P character in PRINT text of jButton1.

(9)

To set the tool tip as Click to get print when mouse is place on PRINT button.

Assignment No. 7
JAVA IDE PROGRAMMING USING SWING II
TYPE A: VERY SHORT ANSWER QUESTION
1.

What is a Label used for? Write some common properties of a Label?

2.

What is the usage of icon property of a label?

3.

You have assigned a foreground color and a background color through


foreground and background properties of a label. But the label is not
showing any background color. What could be the reason?

4.

Write names methods to obtain and change text of a label?

5.

Can you display text along with an image in a label? How?

6.

Which import code line, you must write before you add images in labels?

7.

Write names of Swing API classes, most common events, event-listener, and
event handler methods for the following types of components:

(i) label
(ii) dialog
(iii) button
(iv) password
(v) text area
(vi) check box
(vii) radio button (viii) button
8. Which property would you set for setting the password character as $ ?
9.

Which method returns the password entered in a password field ?

10. What

is the difference between a check box and a radio button ?

11. What is mnemonic?


12. What is Focus?
13. If

What is it used for? How do you set it?

What are the focus related events?

the minimumSize property of a frame is[0, 0] what would happen ?

14. How

would you hide a frame namely Test_Frame ? Write code for it ?

TYPE B: SHORT ANSWER QUESTIONS


1.

Identify the error in the following code that is written in action event
handler of a button namely OKBtn.
double d = nameTF .getText( ) ; String
age = ageTF.getText( ) ;
double marks = Double.parseDouble (marksTF.getText( )) ;

2.

What is Dialog? How are dialogs useful in an application?

3.

What is the difference between a text field and a text area ?

4.

What is the difference between a getText( ) and getPassword( ) methods ?

5.

How can you display multiple lines of un-editable text in a label?

6.

What are these methods used for ?


(i)

7.

isEditable( )

(ii) setEditable ( )

(iii) getEchoChar( )

What is the significance of lineWrap property of a text area ?

8.

What major events and methods are associated with the following:
(i) Text

Field

(ii) Password Field

(iv) Radio Button (v) Scroll Bar


9.

(iii) Check Box


(vi) Text Area

Write code for the event handler of a radio button so that when it
is selected/unselected, its text changes to I am selected or I am
unselected.

10. What is the significance of a button group?

How do you create a button group?

11. Write code for action event handler of a slider control so that its current value is

displayed in a textfield (valTF).

Assignment No. 8
JAVA GUI PRGRAMMING USING SWING III
TYPE A: VERY SHORT ANSWER QUESTION
1.

Name the swing API classes that create (1) a list (2) a combo box.

2.

Which list property do you set for specifying the contents of the list?

3.

What do you understand by selection model of a list?

Which method would you use to determine which index has been selected in a list?
5. How would you determine whether 7th item in a list of a list namely MyList is selected or
not?
4.

6.

You want to clear the selection in a list namely ChkList. How would you do this?

7.

Name the event that gets fired when a user selects or unselects an item in a list.

8.

Name the event handler of ListSelection Listener interface that handles the event in
case of selection change in a list.

9.

How would you ensure that in a list


1)

Only a single item gets selected.

2)

Only a single range of item gets selected.

3)

Multiple ranges of items get selected.

10. What is a list model? What is a default list model?


11. How can you add/remove elements to a jlist?
12. How can you add/remove elements to a ListModel?
13. A default list model namely cityDLM has been created from the list model of a list

namely CityList. Which method would you use to add an element at the end of
CityList?
14. Can you display graphics in a list?
15. Is a combo box by default editable? If not, then how you make it editable?
16. How would you obtain selected item from a combo box?
17. How would you determine whether a combo box is editable or not?
18. You want to remove all the items from a combo box. Which method would you

use to accomplish this?


19. Which event gets fired whenever a selection is made in a combo box?
20. Which class lets you generate random integers?

TYPE B: SHORT ANSWER QUESTIONS


1.

Compare and contrast a list box and a combo box.

2.

Write code to obtain text of selected items from a list namely List1.

3.

Write code to add item Ajmer to list CityList.

4.

Write code to remove item at 3rd index in list CityList.

5.

Write code to add items (Rai and Shivpuri) in list CityList. Rai should be
added at 5th position and Shivpuri should be added at 9th index.

6.

What method obtains the current selection of a combo box? Give a code- example.

7.

Discuss about some commonly used properties of lists & combo boxes.

8.

Write code to generate random number in the range 2050.

Assignment No. 9
LAB - ACTIVITY
1. Develop an application to display a Welcome message when
Show Message button is pressed.

2. Develop a Data entry form for School Admission System as per


design given below, using proper font size, color etc. Also add
functionality to clear all the text boxes when Clear button is
pressed.

3. Develop an application to display full name for given first name


and last name when Show button is pressed.

4. Develop a Pager application to simulate the functionality of Pager.


The numbers when pressed are displayed right aligned on the
display panel and a Dialing message appears when Dial button is
pressed. Display panel gets clear when Clear button is clicked.

5. Develop a simple Adder application as per given screen


snapshot, to add two given numbers.

6. Develop a simple Calculator application as per given screen


snapshot, to implement +, -, x and / operations. The text boxes
get cleared when C button is clicked.

7. Develop a Simple Interest Calculator application as per given


screen snapshot, to calculate simple interest for given Amount,
Rate of Interest and Time using (I=P*R*T/100) formula.

8. Develop an application to display a relevant message based on the


given age. If given age is greater or equal to 18 then Eligible to
Vote message appears otherwise Not eligible is displayed when
user presses Check button.

9. Develop an application to check whether a given number is Even or


Odd.

10. Develop an application to check whether a given year is Leap


year or not. Leap year are those year which are divisible by 100
and 400 or divisible by 4 only.

11. Develop a Discount Calculator application for a Computer shop.


The discount is given as per the following rules.
If total amount >= 10000 then discount is 15%. If total amount
>= 5000 and
<10000 then discount is 10%. If total amount < 5000 then
discount is 5%. Total amount, discount and Net amount is
calculated when Calculate button is pressed. All the text
Boxes gets cleared when Clear button is pressed.

12. A Quick Fox Transport Co. wants to develop an application


for calculating amount based on distance and weight of
goods.The charges (Amount) to be calculated as per rates
given below.
Distance Weight
>=500
>=100 kg.
Km
>=10 and <100
kg.10 kg.
<
<500 Km >=100 Kg.
<100 Kg.

Charges per
Km.5/Rs.
Rs. 6/Rs. 7/Rs.8/Rs.5/-

13. ABC Public School uses an application for calculating Total marks,
percentage and grades of students for given marks in five subjects with
maximum marks of 100. The Screen shot and Grade calculation rule is
given below.

Total Marks
>=90
80-89
70-79
60-69
50-59
40-49
<40

Grade
A+
A
B
C
D
E
Detained

14. Develop an application which determines and display day for given Day

number of a week. The screen shot is given below.

15. Develop an application which calculates Area, Perimeter and Diagonal

for given length and breadth.

16. Read the following case study and answer the question that follows: Sagar electronics has the

following products with their list prices given. The store gives 10% discount on every
product. However at the time of festival season the store gives additional 5% discount.
Product Name
Washing Machine
TV
Refrigerator
OTG
Music System

List Price (Rs.)


20000
40000
18000
3000
5000

Note the product name is stored in JComboBox and use of switch case is mandatory to choose the
product from JComboBox.

17. Develop a Table Generator Application which calculates and prints a

table of given number.

18. Develop a Factorial Generator Application which calculates and prints a

factorial of given number. Factorial of a number is obtained by


summing of multiplications from 1 to given number i.e. Factorial of 4 is
1x2x3x4 =24.

19. Develop a Prime Checker Application which checks whether a given

number is Prime or not. Prime numbers are those numbers which are
divisible by one or itself only.

20. Develop a Java application to print a Pattern for given character and

steps, as per given screen shot.

21. Develop an e-Learning application with images and text

information as per given screen shot.

22. Develop a Login screen as given below. A Message dialog with

relevant message is appears as per given valid or invalid


password.

23. Develop an application as per given below to customize the appearance

of given text in selected color and style.

24. Develop a Temperature Converter application which converts selected

Celsius temperature on a scale and displays it equivalent Fahrenheit


temperature.

25. Develop a Billing application for Happy Shoping- A retail chain involve

in sales of Readymade garments. The happy Shoping offers discount


to its members holding Platinum, Gold and Silver card.
The 10% discount is given to Platinum card, 8% to Gold Card
and 5% to Silver Card holders on sales amount.

26. The Entertainment Paradise- A theater in Delhi wants to develop a

computerized Booking System. The proposed Interface is given


below. The theater offers different types of seats. The Ticket rates
areStalls- Rs. 625/-, Circle- Rs.750/-, Upper Class- Rs.850/- and
Box- Rs.1000/-. A discount is given 10% of total amount if
tickets are purchased on Cash. In case of credit card holders
5% discount is given.

27. Develop an application as per given screen shot to display the given

text in selected color using List control.

28. Redesign the application developed in Experiment 26, using combo control.

29. Develop an application as per given screen shot to Add , Remove the

given members of list and display the selected item in a text field
using List control.

30. Develop an application to compute the Factorial and Checking Prime for

a given number, using custom methods. A method named factorial()


and CheckPrime() along with suitable parameters are called when Get
Factorial and Check Prime button is pressed respectively.

31. Develop an e-Mail sending Application which facilitates the login and

composing screen as given below. A Message box also displayed with


proper message when invalid password is given by user and when
mail is sent after pressing Send button.

Assignment No. 10
PROGRAMMING GUIDELINES
TYPE A : VERY SHORT ANSWER QUESTIONS
1.

Define the following terms :


(i)

Prologue,

(iii) Pretty typing/printing,

(ii)

Robustness

(iv) Guard code

2.

What is the process of translation of the algorithm into a program, called?

3.

What is a source code? What is an object code?

4.

What does the compilation do? Under which phase, the program is executed?

5.

Name the three types of errors? Name two types of compilation errors?

TYPE B: SHORT ANSWER QUESTIONS


1.

Why a program should have good presentation style? Discuss some Stylistic
guidelines to write a good program.

2.

What are the characteristics of a good program?

3.

What do you mean by the clarity of expressions in a program? What is its significance?

4.

What is meant by Application development? What major steps are followed to


develop a program?

5.

What are main error types? Which types are most dangerous and why?

6.

A properly designed and coded program, reduces the probability of bugs and
hence the Maintenance cost. Do you agree with the statement? Why?

7.

Differentiate between-

1. Syntax error & Semantics error


2. Syntax error & Logical error
2. Compile-time & Run-time error
4. Corrective & Adaptive
8. What is program documentation? What is its importance?
9.

What do mean by Program testing? What is differentiate between Unit testing &
Integration testing.

10. What do you mean by Program Maintenance? Why it is considered very important?

Discuss major types of Program Maintenance occurred during life cycle of a


program.

Assignment No. 11
DBMS CONCEPTS
TYPE A : VERY SHORT ANSWER QUESTIONS
1.

What is data redundancy? What are the problems associated with it?

2.

How do data base management systems overcome the problems associated


with data redundancy?

3.

How do database management systems ensure data security and privacy?

4.

What is data model? Name various data model?

5.

Define the following terms:


(I) DBMS

(ii) View
(vi) domain (vii) tuple

(iii) data security


(viii) attribute

(iv) data integrity


(ix) Degree

(v) Relation
(x) cardinality

6.

What are views? How are they useful?

7.

What do you mean by referential Integrity? How it is enforced in DBMS?

8.

What is Key? Define the following keys(I)

Primary key

(ii) Candidate key

(iii) Alternate key

(IV) Foreign key.

TYPE B : SHORT ANSWER QUESTIONS


1.

What is Database Management System? Discuss its functions?

2.

Why DBMS is mostly used in IT applications. Discuss its advantages.

3.

What is Data Abstraction? Draw a diagram explaining various levels of data


abstraction.

4.

What is meant by Data independence? Explain difference between Logical and


Physical data independence.

5.

What do you mean by data model? Discuss various data model with their
major characteristics.

Assignment No. 12
INTRODUCTION TO MYSQL
TYPE A : VERY SHORT ANSWER QUESTIONS
1.

What is MySQL? By which company was MySQL developed?

2.

Who is chief developer of MySQL? What is name of dolphin logo of MySQL?

3.

What LAMP stands for? Write the use of its element applications.

4.

What types of commands are used in the following categories?


1.

DDL

3. TCL
5.

2. DML
4. System control commands

What do you mean by Data dictionary? What it consist of?

TYPE B : SHORT ANSWER QUESTIONS


1.

What is MySQL? Describe its features?

2.

What is the use of SQL and MySQL?

3.

Differentiate between DDL and DML commands?

4.

What do you understand by client server architecture of MySQL?

5.

What is SQL? Discuss the different categories of commands of SQL?

Assignment No. 13
SIMPLE QUERIES IN SQL
TYPE A: VERY SHORT ANSWER QUESTION
1.

What is data type? Name some data types available in MySQL.

2.

What are fixed length fields? What are variable length fields?

3.

Compare Char and Varchar data types?

4.

What is null value in MySQL database? Can you use nulls in arithmetic expressions?

5.

Which keyword eliminates the redundant data from a query result?

6.

Which keyword retains duplicate output rows in a query result?

7.

How would you display system date as the result of a query?

8.

How would you calculate 13*15 in SQL?

9.

Which function is used to substitute Null values in a query result?

10. Which operator concatenates two strings in a query result?


11. What command is used for1.

To change/open a database

2. To view the table structure.

12. Which comparison operator is used for comparing?

(i) Patterns

(ii) character value

(iii) null values (iv) ranges

(v) list of values

TYPE B: SHORT ANSWER QUESTION


Table: Empl
empno
8369
8499
8521
8566
8654
8698
8882
8888
8839
8844
1.

ename
SMITH
ANYA
SETH
MAHADEV
MOMIN
BINA
SHIVANSH
SCOTT
AMIR
KULDEEP

job
CLERK
SALESMA
SALESMA
MANAGE
SALESMA
MANAGE
MANAGE
ANALYST
PRESIDEN
SALESMA

mgr
8902
8698
8698
8839
8698
8839
8839
8566
NUL
8698

hiredate
sal
comm deptno
800.00
1990-12-18
NULL
20
1600.00
1991-02-20
300.00 30
1250.00
1991-02-22
30
500.00
1991-04-02 2985.00 NULL 20
1991-09-28 1250.00 1400.00 30
1991-05-01 2850.00 NULL 30
1991-06-09 2450.00 NULL 10
1992-12-09 3000.00 NULL 20
1991-11-18 5000.00 NULL 10
1991-09-08 1500.00
0.00
30

Consider the Empl table and write SQL command to get the following.

a.

Write a query to display EName and Sal of employees whose salary are greater
than or equal to 2200?

b.

Write a query to display details of employs who are not getting commission?

c.

Write a query to display employee name and salary of those employees who
dont have their salary in range of 2500 to 4000?

d.

Write a query to display the name, job title and salary of employees who
dont have manager?

e.

Write a query to display the name of employee whose name contains A as third
alphabet?

f.

Write a query to display the name of employee whose name contains T as last
alphabet?

g.

Write a query to display the name of employee whose name contains M as First
and L as third alphabet?

h.

Write a query to display details of employs with the text Not given, if commission is
null?

2.

Write SQL command for the following in the basis of given table (STUDENT)?
Student No. Class Name Game
Grade 1
10
7
Sameer Cricket
B
11
8
Sujit
Tennis
A
12
7
Kamal Swimmin
B
13
7
Veena Tennis
C

SUPW
Grade 2
Photograph
A
Gardening
C
Photograph
B
Cooking
A

(i)

Display the names of the student who are getting a grade C in either games or
SUPW.

(ii)

Display the different games offered in the school.

(iii) Display the SUPW taken up by the student whose names starts with A
3.

Write SQL command for the following on the basis of given table sports.
Student No. Class
10
7
11
8
12
7
13
7
14
8

Name
Sameer
Sujit
Kamal
Veena
Kamal

Game 1
Grade 1
Cricket
B
Tennis
A
Swimming
B
Tennis
C
Cricket
A

Game 2
Swimmin
Skating
Football
Tennis
Tennis

Grade 2
A
C
B
A
B

(i)

Display the name of the students who have grade C In either game 1 or game 2 or
both.

(ii)

Display the name of the students who have same grade for both game 1 and game 2.

(iii) Display the games taken up by the student whose name starts with A
4.

Write SQL command for the following in the basis of given table (Club)?
COACH_I
1
2
3

COAC
AGE
KUKRE
35
RAVIN
34
KARAN 34

SPORTS
KARATE
KARATE
SQUASH

Dsteofapp
27/3/1996
20/01/1998
19/02/1998

PAY
1000
1200
2000

SEX
M
F
M

4
5

5.

TARUN
ZUBIN

01/01/1998
12/01/1998

1500
750

M
M

To show all information about the swimming coaches in the club.

b.

To list names of all coaches with their date of appointment in descending order.

c.

To display report, showing coachmen pay, age and bonus (15% of pay).

Write SQL command for the following in the basis of given table (Student)?
Name
Karan
Diwakar
Divyu
Arun
Sabeena

Stipend
400
450
300
350
500

Stream
Medical
Commerce
Commerce
Humanities
Non

Avg
78.5
89.2
68.6
73.1
90.6

Grad
B
A
C
B
A

Clas
12B
11C
12C
12C
11A

a.

Select all the Non medical stream students from this table.

b.

List names of those students who are in class 12 stored in stipend.

c.

List all student stored by avg marks in descending order.

d.

Display a report, listing name, stipend, stream, and amount of stipend


received in a year assuming that stipend is paid every month.

Write SQL commands for the following on the basis of given table.
No.
1
2
3
4
5

7.

SWIMMI
SWIMMI

a.

No
1
2
3
4
5

6.

33
36

Table: LIBRARY
Title
Author
Lipschu
Data Structure
Computer studies French
Advanced Pascal Schildt
Dbase dummies Palmer
Mastering C++ Gurewi

Type
DS
FND
PRO
DBM
PRO

Pub
McGraw
Galgotia
McGraw
PustakM
BPB

Qty
4
2
4
5
3

Price
217
75
350
130
295

a.

Select all the PROG type published by BPB from Library.

b.

Display a list of all books with Price more than 130 and stored by Qty.

c.

Display all the books stored by Price in ascending order.

Write SQL commands for the following on the basis of given table MOV.
No
1
2
3
4
5
6

Title
Gone with the wind
Friday the 13th
Top sun
Splash
Independence Day
Risky business

Type
Drama
Horror
Drama
Comed
Drama
Comed

Ratin
G
R
PG
PG13
R
R

Stars
Gable
Jason
Cruise
Hanks
Turner
Cruise

Qty
4
2
7
3
3
2

Price
39.95
69.95
49.95
29.95
19.95
44.95

a.

Display a list of all movies with Price over 20 and sorted by Price.

b.

Display all the movies sorted by QTY in descending order.

c.

8.

Display a report listing a movie number, current value and replacement value
for each movie in the above table. Calculate the replacement value for all
movies as QTY
*Price* 1.15.

Write SQL commands for the following on the basis of given table relation Teacher.
No.
1
2
3
4
5
6
7
8

9.

NAME
Jugal
Sharmila
Sandeep
Sanggeta
Rakesh
Shaym
Shiv Om
Shalakha

Age
33
31
32
35
42
50
44
33

Department
Computer
History
Maths
History
Maths
History
Computer
Math

Dateofjoin
10/01//97
23/03/98
12/12/96
01/07/99
05/09/97
27/06/98
25/02/97
31/07/97

Salary Sex
12000 M
20000
F
30000 M
40000
F
25000 M
30000 M
21000 M
20000
F

a.

To show all information about the teacher of history department.

b.

To list the names of female teachers who are in Hindi department.

c.

To list names of all teachers with their date of joining in ascending order.

Write the Syntax of Select command and describe various options/ keywords
used, with example.

10. What do you mean by Operator Precedence? Make a ordered list of operators from

highest precedence to lowest.

Assignment No. 14
MySQL FUNCTIONS
TYPE A: VERY SHORT ANSWER QUESTION
1.

Define a function. Why they are useful?

2.

Differentiate between single row and multiple row functions?

3.

What will be the output of following command?


a.

mysql>SELECT CONCAT(CONCAT (Inform, atics),Practices);

b.

mysql> SELECT LCASE (INFORMATICS PRACTICES CLASS !!TH);

c.

mysql> SELECT UCASE (Computer studies);

d.

mysql> SELECT CONCAT (LOWER (class), UPPER (xii) );

4.

Write commands to display the system date.

5.

Write a command to display the name of current month.

6.

Write SQL statement to display


Today, the date is <current date>

7.

Write command to print the day of the week of your birthday in the year 1999.

8.

What is the difference between SYSDATE() and NOW() function?

9.

Consider two fields B_date, which stores the birth date and J_date, which stores the
joining date of an employee. Write commands to find out and display the
approximate age of an employee as on joining date.

10. Consider a field B_date, which stores the birth date of student.

Write commands to
find out and display the approximate age of student as on today.

TYPE B: SHORT ANSWER QUESTION


1.

Given the following table:


COACH_I
1
2
3
4
5
6
7
8
9
10

COACHNA
KUKREJA
RAVINA
KARAN
TARUN
ZUBIN
KETAKI
ANKITA
ZAREEN
KUSH
SHAILYA

TABLE: CLUB
AGE
SPORTS
35
KARATE
34
KARATE
34
SQUASH
33
BASKETBA
36
SWIMMING
36
SWIMMING
36
SQUASH
37
KARATE
41
SWIMMING
37
BASKETBA

DATOFAP
1996-03-27
1998-01-20
1998-02-19
1998-01-01
1998-01-12
1998-02-24
1998-02-20
1998-02-22
1998-01-13
1998-02-19

Give the output of following SQL statements:


SELECT LCASE (SPORTS) FROM Club;
(ii) SELECT MOD (Age, 5) FROM CLUB WHERE Sex =F;
(i)

PAY
1000
1200
2000
1500
750
800
2200
1100
900
1700

SEX
M
F
M
M
M
F
F
F
M
M

(iii)
(iv)

SELECT POWER (3, 2) FROM CLUB WHERE Sports=KARATE;


SELECT SubStr (CoachName, 1, 2) FROM CLUB WHERE Datofapp>1998-01-31;

2.

Write a query to show the current date and time.

3.

Write a query against the ADDRESS table to show the names (first name, last
name) and phones of all persons concatenated in the following form:

TinaSeth23456789
MoradK.22211890
4. Write a query for EMPL table to show the names of employees concatenated
with their jobtypes.
5.

Given the following table-

No
1
2
3
4
5
6
7
8
9
10

Name
Karan
Divakar
Divya
Arun
Sabina
John
Robert
Rubina
Vikas
Mohan

TABLE: STUDENT
Stipend Stream
AvgMar
400
Medical
78.5
450
Commerce 89.2
300
Commerce 68.6
350
Humanities 73.1
500
Nonmedica 90.6
400
Medical
75.4
250
Humanities 64.4
450
Nonmedica 88.5
500
Nonmedica 92.0
300
Commerce 67.5

Grade
B
A
C
B
A
B
C
A
A
C

Class
12B
11C
12C
12C
11A
12B
11A
12A
12A
12C

Give the output of the following SQL statement:


SELECT TRUNCATE(AvgMark) FROM Student1 WHERE AvgMark<75;
(ii) SELECT ROUND(AvgMark) FROM Student1 WHERE Grade=B;
(iii)SELECT CONCAT(Name, Stream) FROM Student1 WHERE
Class=12A; (iv)SELECT RIGHT (Stream,2) FROM Student1
(i)

6.

Given the following table:

TABLE: LIBRARY
No.
Title
Author
Type
Pub
Qty
1. Data Structure
Lipschut DS
McGraw 4
2. Computer Studies
French
FND
Galgotia
2
3. Advanced Pascal
Schildt
PROG
McGraw 4
4. Dbase dummies
Palmer
DBMS
PustakM 5
5. Mastering C++
Gurewic PROG
BPB
3
6. Guide Network
Freed
NET
BPB
3
7. Mastering FoxPro
Seigel
DBMS
BPB
2
8. DOS Guide
Norton
OS
PHI
3
Give the output of following SQL commands on the basis of table library.

Price
217
75
350
130
295
200
135
175

SELECT UPPER (Title) FROM Library WHERE Price<150;


(ii) SELECT CONCAT (Author, Type) FROM Library WHERE Qty <3;
(iii) SELECT MOD (Qty, 4) FROM Library;
(i)

7.

Consider the structure of ADDRESS tableTABLE: ADDRESS

Column Name
Data Type
Column Name
Data Type
LastName
VARCHAR(2 State
CHAR(2)
FirstName
VARCHAR(2 Zip
NUMBER
Street
VARCHAR(2 Phone
VARCHAR(1
City
VARCHAR(2 Ext
VARCHAR(5
8. Write a query against the ADDRESS table to select a list of names and phone
numbers. The output should match these requirements:
(i)
(ii)

The name column should contain both the first and last names with a blank space
between them.
The second column will contain the phone number in (999)999-9999 format.

(iii) Order the query by last name then first name.

9.

Make summery tables with category of MySQL commands, syntax and use.

10. Explain the following functions with syntax, purpose and example.

1) CONCAT()
5) MID()
9) CURDATE()

2) SUBSTR()
6) MOD()
10) NOW()

3) TRIM()
7) POW()
11) SYSDATE()

4) INSTR()
8) ROUND()
12) DAYNAME()

Assignment No. 15
Table Creation & DML Commands
TYPE A: VERY SHORT ANSWER QUESTION
1.

Which command is used for creating tables?

2.

Which is a constraint? Name some constraint that you can apply to enhance
database integrity.

3.

What is the role of UNIQUE constraint? How is PRIMARY KEY constraint


different from UNIQUE constraint?

4.

What is Primary key? What is PRIMARY KEY constraint?

5.

What is NOT NULL constraint? What are DEFAULT constraints?

6.

When columns value is skipped in an INSERT command, which value is


inserted in the database?

7.

Can a column defined with NOTNULL constraint, be skipped in an INSERT command?

8.

How would you view the structure of table Dept?

9.

Table NewEmpl has same structure as that EMPL. Write a query to insert data from
EMPL table into NewEmpl, where salary is more than Rs 4000 and commission is
greater than 500.

10. What is the error in following statement?

UPDATE EMPL;
TYPE B: SHORT ANSWER QUESTION
1.

How constraints ensure the validity of data? Explain various types of


constraints with example.

2.

What is FOREIGN key? How do you define foreign key in your table?

3.

How is FOREIGN KEY different from PRIMARY KEY command?

4.

What are table constraints? What are column constraints? How are these two different?

5.

What is default value? How do you define it? What is default value for a column for
which no value is defined?

6.

Differentiate between:

7.

(i)

DROP TABLE & DROP DATADABASE

(ii)

DROP TABLE & DROP clause of ALTER TABLE.

Consider the following table and answer the following-

Table: Empl
empno
8369
8499
8521
8566
8888
8839
8844
.
.

ename
SMITH
Anya
SETH
MAHADEV
SCOTT
AMIR
Gates
.
.

job
CLERK
SALESMA
SALESMA
MANAGE
ANALYST
MANAGE
PRESIDEN

mgr
8902
8839
8839
8844
8566
8844
NULL
..
..

hiredate
1990-12-18
1991-02-20
1991-02-22
1991-04-02
1992-12-09
1991-11-18
1991-11-18
.
.

sal
800.00
1600.00
1250.00
2985.00
3000.00
5000.00
5000.00
.
.

comm deptno
NULL
20
300.00
30
500.00
30
NULL
20
NULL
20
NULL
10
NULL
10
..
.
..
.

a)

Update all Ename so that it contains the entire name in capital letters.

b)

Increase the salary of employee by 10% in Empl table.

c)

Give commission of Rs 500 to all employees who joined in year 1982 in Empl table

d)

Modify table Empl, add another column called Grade of VARCHAR type size 1 into
it.

e)

In the added column Grade, assign grade as follows.

if sal is in range 700-1500 Grade is 1


If sal is in range 1500-2200 Grade is 2
If sal is in range 2200-3000 Grade is 3
if sal is in range 3000- Grade is 4
f) Display the details of employees who are working under the employee named AMIR.

8.

g)

Modify the definition of column Grade. Increase its size to 2.

h)

Drop the table Empl.

Given the following tables:


Orders (Ordno, Ord_date, ProdNo, Qty) Product
(Prodno,Descp,Price)
Payment (OrdNo,Pment)
Write query statements for following transaction.

a)

Increase price of all products by 10 %.

b)

List the details of all orders. Whose payment is pending.

c)

Decrease price by 10% for all those products for which order were placed 10
months before.

d)

Write a query to delete all those records from table Orders whose payment has
been made.

9.

Create the table Employee based on the following table instance Chart.

FirstName
Column name ID
NUMBE VARCHAR
Data Type
8
25
Length
10. Write the command for the followinga)

LastName
VARCHAR
25

DeptID
NUMBER
8

Create table CUSTOMER as per following Table structure.

CustID
CustName CustAdd1 CustAdd2 CustPhone
Column
NUMBE VARCHA VARCHA VARCHA VARCHAR
Data Type
7
30
20
30
10
Length
b) Add one column Email of data type VARCHAR and size 30 to table Customer.
c)

Add one more column CustIncomeGroup of data type VARCHAR(10).

d)

Insert few records with relevant information in the Customer table.

e)

Drop the column CustomerIncomeGroup from table Customer.

11. Create table Employee as per following Table structure.

Col. name
Key type
Nulls /Unique
Fk Table
Fk Column
Datatype
Length

EmpID
Primary

EmpName

EmpAdd

EmpPhone EmpSal

DeptID
Foreign

NOT NULL
NUMBE
6

Department
Dept_ID
VARCHAR VARCHA VARCHA NUMBE VARCHAR
20
30
10
9,2
2

Assignment No. 16
LAB ACTIVITY
I.

Open MySQL and Login with your ID and password given by your Teacher. Write
and Execute the SQL command for the following and also write the
steps/commands in your Practical notebook.
1

Create a Database named MYORG.

Open the Database with USE command.

Create a table name Emp with following structure.

empno ename job


Number Varchar Char(10)
4 Insert the following Records-

hiredate
Date

sal
comm
Number Number

empno
ename
job
hiredate
sal
8369
SMITH
CLERK
1990-12-18 800.00
8499
ANYA
SALESMAN 1991-02-20 1600.00
8521
SETH
SALESMAN 1991-02-22 1250.00
8566
MAHADEVA MANAGER 1991-04-02 2985.00
8654
MOMIN
SALESMAN 1991-09-28 1250.00
8698
BINA
MANAGER 1991-05-01 2850.00
8882
SHIVANSH MANAGER 1991-06-09 2450.00
8888
SCOTT
ANALYST
1992-12-09 3000.00
8839
AMIR
PRESIDENT 1991-11-18 5000.00
8844
KULDEEP
SALESMAN 1991-09-08 1500.00
5 Write a query to display all the records with all the columns.

comm
NULL
300.00
500.00
NULL
400.00
NULL
NULL
NULL
NULL
0.00

Write a query to display EName and Sal of employees whose salary are
greater than or equal to 2200

Write a query to display details of employs who are not getting


commission.

Write a query to display employee name and salary of those employees


who dont have their salary in range of 2500 to 4000.

Write a query to display the name of employee whose name contains


A as third alphabet in Ascending order of employee names.

10

Write a query to display the ename and sal with 50% of sal as DA.

11

Write a query to display the name of employee whose name containsM as


First and L as third alphabet.

12

Write a query to display details of employs with the text Not given, if
commission is null.

13

Display the distinct job titles offered by the Organization.

14

Display the Names of employees who are working as Manager or


Analyst.

15

Display the names of employees who joined the organization on or after


01/05/1991.

II.

Open MySQL and load MYORG database. Write and Execute the SQL
command for the following and also write the steps/commands in your Practical
notebook.
1

Write commands to display the system date.

Write a command to display the name of current month.

Write command to print the day of the week of your birthday in the year
2015.

Write a query to display employee names in lower case from Emp table.

Write a query to display last 3 characters from all the names of


employee from Emp table.

Write a query to display ename alon with the position of N character in


ename column from Emp table.

Write a query to display ename and two characters from 2nd position in
job column from Emp table.

Write a query to display ename and weekday on which they joined from
Emp table.

Write a query to display ename alon with number of years(experience) as


on today from Emp table.

Write a query to display ename, Job and Date of retirement (60 years
after Hiredate) from Emp table.
3
11 Write a query to find out the result of 6 .
10

12

Write a query to find out the result of 301/2 (Square root of 30)

13

Write the command to display the ename and its length from Emp table.

14

Write the command to round off value 15.193 to nearest tens i.e. 20.

15

Write a query to display ename concatenated by job from Emp table.

Assignment No. 17
I.

Write and Execute the SQL command for the following and also write the
steps/commands in your Practical notebook.
1.

Create table CUSTOMER as per following Table structure.

CustID
CustName CustAdd
CustCity
CustPhone
Column
Name
Data Type
NUMBE VARCHA VARCHA VARCHA VARCHAR
Length
7
30
40
30
10
Constraints
Primary
Not Null
2. Insert 5 records with relevant information in the Customer table.
3.

Update all the records as add Mr. with CustName.

4.

Add one column Email of data type VARCHAR and size 30 to table
Customer.

5.

Add one more column CustIncomeGroup of data type VARCHAR(10).

6.

Drop the column CustomerIncomeGroup from table Customer.

7.

Modify the column CustCity as change the size 40 characters long.

8.

Delete all the records who belongs to Jaipur

9.

Create table ORDER as per following Table structure. Also make CustNo as
Foreign Key which refers CustID of CUSTOMER table.

Column
OrderNo CustNo ItemName Qty
Name
Data Type
NUMBE NUMBE VARCHA NUMBER
Length
5
7
30
5
Constraints
Primary
>=2
10. Add 5 records as per defined constraints in Order table.

Price
NUMBER
6,2
Not Null

11.

Create a table TEMPCUSTOMER from existing CUSTOMER table


with CustID, CustName and CustPhone columns.

12.

Write command to show the Tables in the MYORG Database.

13.

Drop the TEMPCUSTOMER table.

14.

Drop the Foreign Key constraints from the Order Table.

15.

Drop the database MYORG.

II.

Write SQL Commands for the questions i) to x) on the basis of table Teacher.
Table : Teacher
No.
1
2
3
4
5

Name
Jugal
Shanti
Sandeep
Radhika
Rakesh

Age
34
31
32
45
35

Department
Computer
History
Maths
History
Computer

Dateofjoin
2007-02-10
2008-03-24
2009-02-25
2007-04-15
2007-05-17

Salary
12000
20000
14000
20000
21000

Tripcharge
NULL
NULL
4000
5000
NULL

To show all information about the teacher of History department in


descending order of their name.
(ii)
To list the male teacher who are getting salary more than 15000.
(iii) To display Name, Salary, Age of all male teacher.
(iv)
Increase the Salary by Rs. 700 for male teacher.
(v)
To insert a new record in table Teacher with the appropriate data.
(vi)
Display the name of those teacher whose name start with alphabet R.
(vii) To Delete those records where Department is Computer.
(viii) Write SQL Command to drop column age from teacher table.
(ix)
Display details of the employee with the text not given, if trip charge is null.
(x)
Display name of the entire teacher joined before 2008.
(i)

III.

Write SQL Commands for the questions i) to vi) on the basis of table Movie.

Gender
M
F
M
F
M

Assignment No. 18
IT APPLICATIONS
TYPE A: VERY SHORT ANSWER QUESTION
1.

Define the followinga)

E-Governance

b) E-Business

c) E-Learning

2.

List any five web portal with their purposes involved in E-Governance.

3.

List any five web portal with their purposes involved in E-Commerce or Business.

4.

List any five web portal with their purposes involved in E-Learning

5.

What is meant by E-governance Model? How E-Government interacts Citizen,


Business and Government.

TYPE B: SHORT ANSWER QUESTION


1.

How has society benefitted from e-governance? What are the limitations of e-governance?

2.

How has society benefitted for e-business? Discuss its limitations?

3.

How has society benefitted for e-learning? Discuss its limitations?

4.

Why do you think e-learning courses have high dropout rate?

5.

Discuss some popular e-business types incorporated through e-business systems.

6. Suruchi works for a Shopping Mart. She wants to create controls on a form for the

following operations: Choose most appropriate controls out of Text box, Label, Radio
Button, List box, Combo box, Check box and Command button.

You might also like