Skip to main content

CS506 Current Midterm Paper Fall 2013 File 13



1              whats the start do in applet cycle and when we use it
ans :
To start the applet's execution
• For example, when the applet's loaded or when the user revisits a page that contains the
applet
• start( ) is also called whenever the browser is maximized

2              .Write the syntax to load the oracle driver
ans:
Class.forName(“oracle.jdbc.driver.OracleDriver”);

3              what dose codes do

 ResultSet rs=TYPING_SCROLL_INSENSITIVE
ResultSet.TYPE_SCROLL_INSENSITIVE,

The following code fragment, illustrates how to make a ResultSet object that is scrollable and
updatable.
String sql = “SELECT * FROM Person”;
PreparedStatement pStmt = con.prepareStatement(sql,
ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = pStmt.executeQuery( );
Two constants have been used of ResultSet class for producing a ResultSet rs that is
scrollable, will not show changes made by others and will be updatable

 4.            What DO MaxRows (int)    &  setMaxRows(int)   methods
• Used for determines the number of rows a ResultSet may contain
• By default, the number of rows are unlimited (return value is 0), or by using
setMaxRows(int), the number of rows can be specified.

5               write any five GUI based component
                1. BUTTON
                2. Label
                3. Text filed
                4.Text area

 6               define paint( ) in applet life cycle

• paint( ) is called for the first time when the applet becomes visible
• Whenever applet needs to be repainted, paint( ) is called again
• Do all your painting in paint( ), or in a method that is called from paint( )

 7.            what is and why we use : JDBC - ODBC Bridge

• Translates all JDBC calls into ODBC (Open Database Connectivity) calls and
send them to the ODBC Driver
• Generally used for Microsoft database.
• Performance is degraded

 8.            What is the difference b/w socket and server socket, also give a java syntax of socket and
Server socket. 5 mr

A socket is one endpoint of a two-way communication link between two programs
running generally on a network.

• A socket is a bi-directional communication channel between hosts. A computer on a
network often termed as host.
 
                The server listens through a special kind of socket, which is named as server socket.
• The sole purpose of the server socket is to listen for incoming request; it is not used
for communication

Syntex for socket
Socket s = new Socket(“serverName”, serverPort) ;

serverName: Name or address of the server you wanted to connect such as
http://www.google.com or 172.2.4.98 etc. For testing if you are running client and server
on the same machine then you can specify “localhost” as the name of server

• serverPort : Port number you want to connect to

Syntex for server socket

Create a Server Socket

In order to create a server socket, you will need to specify port no eventually on which server will listen for client requests.

ServerSocket ss = new ServerSocket(serverPort) ;

• serverPort: port local to the server i.e. a free port on the server machine. This is the same
port number that is given in the client socket constructor

 9              what is disadvantage of interfaces          

One disadvantage of interfaces is that one you publish them to other coders outside your own control, they represent a public commitment which can be difficult to change later. You don't know who else is using the interface and you don't know how, so you can't just add a new method to the interface without risking breaking the code of existing clients (if/when they upgrade). In comparison, if you'd used an abstract or concrete class, you could just add a new concrete method with no problems (usually).

It's possible to work around this b

Comments

Popular posts from this blog

CS614 Quiz No.4 Shared by Princess (solved), Spring 2014

  “What means What”. The phrase refers to: Select correct option:  Meta data  External data Transformed data Internal representations Question # 2 of 10 Which of the following is NOT one of the activities of “Maintenance and Growth” phase in Kimball’s DWH development approach? Select correct option: Education Technical Education Program Support  Interface Deployment                 Question # 3 of 10 Horizontally wide data means: Select correct option: Dataset has large no. of attributes Dataset has large no. of records Dataset has attribute skews Dataset has partitioning skews                 Question # 4 of 10 Which of the following is NOT one of the top-10 mistakes that should be avoided during DWH development? Select correct option: Not interacting directly with end ...

CS614 Quiz No.4 Shared by MT Khan (Solved)

Question # 1 of 10 ( Start time: 09:04:39 PM ) Total Marks: 1 A typical cycle of implementing the change in DWH comprises of the sequence: Select correct option: Production -> QA -> Development Development-> QA -> Production(CORRECT) Development -> Production -> QA Production -> Development -> QA Question # 2 of 10 ( Start time: 09:05:16 PM ) Total Marks: 1 Vertically wide data means: Select correct option: Dataset has large no. of attributes Dataset has large no. of records(CORRECT) Dataset has attribute skews Dataset has partitioning skews Question # 3 of 10 ( Start time: 09:05:43 PM ) Total Marks: 1 In ___________ phase of kimballs approach, we identify the components needed now and in future. Select correct option: Requirement definition Architectural design Product development Analytical application development Question # 4 of 10 ( Start time: 09:06:56 PM ) Total Marks: 1 Technical architecture design supports the communicat...

CS301 Current Finalterm Paper Spring 2014 Shared By M. Waleed

My Tday's Cs301 Paper: Mcq's Are From Moaz And Some Are From Handouts. Subjective Is From Moaz Majority One. 1- The Image Segmentation Define? 2- The Maximum Number Level Of Nodes In Binary Tree 3-The Iteration Array Have To Sort. 4- The Hapified Array Have To Solved 5- The Algorithm Of Binary Seaoh Tree 6-Sara Arrays Wala He Tha Ya Heap Wala. 7-....Wala Wala Wala...