MCQS: 18
CS506 WEB DESIGN & DEVELOPMENT Current mid term paper SPRING 2019 |
π SEE ALSO: Course wise exam instructions
Insert
Delete
Create
2. You can ___ to a network using sockets.
Read
Write
Read/Write
None of these
3. If a class needs to handle events generated by button then which of the following interface a class
needs to implement?
ComponentListener
KeyListener
MouseListener
ActionListener
4. Which of the following package needs to be import while handling files?
java.util
java.io
java.awt
javax.swing
remaining not remembered but were easy
1. Write java code to make a GUI. It will contain a textfield and a button. when the button is clicked it should display the text from textfield on GUI. the text will be displayed using JOptionPane.showMessageDialog() method.
2. Write java code and Make two classes Course and Test class. In course class, define two variables : courseID and courseTitle. and a parameterized constructor to initialize variables. course class will also have a display method which will display its initialized variables. The test class will contain main method. In main method, create a new object of course class and call its display method.
3. Identify errors in the following code, also give reasons
Animals() is an abstract class.
Living() is an abstract method.
Birds() is a derived/subclass.
public class Behaviour{
public static void main(String[] args)
{
Animals a=null;
Animals al=new Animals();
a=new Birds();
a.living();
}
}
4. Write code to override paintcomponent() method and draw unfilled equilateral triangle and orange oval over it.
5. If you have ResultSet rs object. Then write code to get the maximum column width of the 2nd column.
π Recommended mid term papers: CS401 Current paper , CS610 current paper , CS602 current paper , CS504 current paper , MCM301 current paper 2018 , CS502 current paper 2018