CS3391 QB
CS3391 QB
CS3391 QB
QUESTION BANK
PART – A
1.Illustrate a Java application to generate Electricity bill. Create a class with the
following members: Consumer no., consumer name, previous month reading,
current month reading, and type of EB connection (i.e. domestic or commercial).
Compute the bill amount using the following tariff.
If the type of the EB connection is domestic, calculate the amount to be paid as
follows:
i. First 100 units - Rs. 1 per unit
ii. 101-200 units - Rs. 2.50 per unit
iii. 201 -500 units - Rs. 4 per unit
iv. > 501 units - Rs. 6 per unit (15) – (Understand) – BTL2
2. Explain a Java program to find a smallest number in the given array by creating
one dimensional array and two dimensional array using new operator. (15) –
(Understand) – BTL2
3. Explain class hierarchy and explain its types with suitable examples. (15) –
(Understand) – BTL2
4. Express a Java application with Employee class with Emp_name, Emp_id,
Address, Mail_id, Mobile_no as members. Inherit the classes, Programmer,
Assistant Professor, Associate Professor and Professor from employee class. Add
Basic Pay (BP) as the member of all the inherited classes with 97% of BP as DA, 10
% of BP as HRA, 12% of BP as PF, 0.1% of BP for staff club fund. Generate pay
slips for the employees with their gross and net salary. (15) (Understand) – BTL2
UNIT – II
PART – A
PART – B
PART – C
UNIT – III
PART – A
1. Interpret what is an Exception. What is its use? (Understand) – BTL2
2. Predict what function does terminate and unexpected handlers call. (Understand)
– BTL2
3. What is re-throwing an expression? (Remember) – BTL1
4. Define uncaught exception. (Remember) – BTL1
5. Summarize the task performed by exception handling. (Understand) – BTL2
6. Differentiate exception and error. (Understand) – BTL2
7. Classify the exception types with example. (Understand) – BTL2
8. Draw the exception hierarchy. (Understand) – BTL2
9. What are the two methods available in stack trace elements? (Understand) –
BTL2
10. Express the advantages of using exception handling. (Understand) – BTL2
11. What are three types of I/O streams? (Understand) – BTL2
12. Show what is the purpose of the finally clause of a try-catch-
finally statement? (Understand) – BTL2
13. Explain how to create custom exception. (Understand) – BTL2
14. List the any five byte stream class. (Remember) – BTL1
15. Illustrate any four character stream class. (Understand) – BTL2
16. Point out the syntax of buffered reader to connect to the keyboard.
(Remember) – BTL1
17. What are streams? What are their advantages? (Understand) – BTL2
18. Write a Java program to demonstrate the use of readlinemethod. (Understand)
– BTL2
19.Illustrate a Java application using a printwriter class to handle console output.
(Understand) – btl2
20. Define: Thread. (Remember) – BTL1
PART – B
PART – C
UNIT – IV
PART - A
PART – B
PART – C
UNIT – V
PART – A
1. List out some system colors available in Java and theirpurpose. (Remember) –
BTL1
2. Give the role of layout manager. Which layout is default in Java? Define Border
Layout. (Understand) – BTL2
3. Give the steps needed to show a Frame. (Understand) – BTL2
4.Analyse the function of (Remember) – BTL1
I. Set Layout
ii. Flow Layout
5. List the features of Swing. (Remember) – BTL1
6. Name any four event of a button component. (Remember) – BTL1
7. List the various mouse events supported by Java. (Remember) – BTL1
8. Recommend what method can be used for changing case ofcharacters.
(Understand) – BTL2
9. Illustrate the swing components. (Understand) – BTL2
10. Differentiate between Swing and AWT. (Understand) – BTL2
11. Express what is an event and what are the models available for event handling.
(Understand) – BTL2
12. List the difference between scrollbar and scroll pane. (Remember) – BTL1
13. Differentiate between a Choice and a List. (Understand) – BTL2
14. Quote how can you create your own GUI components? (Remember) – BTL1
15.Analyse what is the purpose of the enable Events () method? (Understand) –
BTL2
16. Write a program to print the names of all fonts on yoursystem. (Understand) –
BTL2
17. Show the methods of frame class. (Understand) – BTL2
18. Show the structure of AWT Event Hierarchy. (Understand) – BTL2
19. Give what is JRadioButton and its constructor. (Understand) – BTL2
20. Show what method can be used for changing font of characters? (Understand) –
BTL2
PART – B
1.i. Describe in detail about working with 2D shapes in Java. (7) (Understand) –
BTL2
ii. Identify a Java program to illustrate Mouse Events. (6) (Apply) – BTL3
2.i..Describe in detail about swing Components. (7) ii.Describe the types of layout
management. (6) (Understand) – BTL2
3. Summarize in detail about graphics programming. (13) (Understand) – BTL2
4.I.Explain how an application can respond to events in Java? Write the steps and
the example. (7) (Understand) – BTL2
ii. Explain the adapter class using example. (6) (Understand) – BTL2
5. What is meant by event handling? Analyze and write a simple calculator using
mouse events that restrict only addition, subtraction, multiplication and division.
(13) (Remember) – BTL1
6. Tabulate the controller design pattern and components ofswing briefly. (13)
(Apply) – BTL3
7.i.Illustrate what is layout management? State the various types of layout
supported by Java? Which layout is default one? (7) (Understand) – BTL2
ii.Examine the basic of event handling. (6)
8. Explain with an example program and discuss in detail about Mouse listener and
Mouse Motion Listener. (13) (Understand) – BTL2
9.i.Illustrate the methods available in graphics for COLOR. (7) (Understand) – BTL2
ii.Examine the methods available to draw shapes. (6)
10 i. Explain on AWT Event Hierarchy (7) (Understand) – BTL2
ii. Explain about Semantic and Low-Level Events (6) (Understand) – BTL2
11. List the characteristics of Model View Design (MVC) patterns. Explain the
advantage of MVC and methods MVC. (13) (Remember) – BTL1
12.i.List the types of adjustment events in scrollbar. (7) (Remember) – BTL1
ii.Explain and write a program to demonstrate the usage of Scroll bar. (6)
(Understand)
13 Examine the following in detail (Understand) – BTL2
i. Handling a TextField. (7)
ii. Using a TextArea. (6)
PART – C
Create four check boxes. The initial state of the first box should be in checked
state. The status of each check boxshould be displayed. When we change the state
of a check box, the status should be displayed and updated. (15)
Output.
3. Explain a Java program for event handling using
actionlistener interface (15) (Understand) – BTL2
4. Recommend a Java swing with one button and adding it on the JFrame object
inside the main() method. (15) (Apply) – BTL3