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 Abdul_Mateen (Solved)

Question # 1 of 10 ( Start time: 01:03:34 PM ) Total Marks: 1 The first step of the “12-steps data warehouse implementation approach” of Shaku Atre is: Select correct option: Finding user needs (Page No. 336) Planning system resources Finding system scope Data acquisition and cleansing Question # 2 of 10 ( Start time: 01:04:15 PM ) Total Marks: 1 Users do not care, how advance the front end of your DWH is, what they care is that: Select correct option: Tables should be properly denormalized Proper partitioning technique should be used At least star or snow flake schema should be implemented They should get information in timely manner and the way they want   Question # 3 of 10 ( Start time: 01:04:49 PM ) Total Marks: 1 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 user Not being an accommodating person (Page No. 316) Isolating IT support p...

CS614 Quiz No.3 Shared by Sweety (Solved)

Question # 1 of 10 ( Start time: 09:48:28 PM ) Total Marks: 1 Mining multi dimensional databases allow users to: Select correct option: Categorize the data Analyze the data Summarize the data All of the given options   (Correct) Question # 2 of 10 ( Start time: 09:49:23 PM ) Total Marks: 1 As per Bill Inmon, a data warehouse, in contrast with classical applications is: Select correct option: Data driven   (Correct) Resource driven Requirement driven Time sensitive Question # 3 of 10 ( Start time: 09:50:11 PM ) Total Marks: 1 In ________learning you don’t know the number of clusters and no idea about their attributes. Select correct option: Supervised learning Unsupervised learning   (Correct) Multi Dimension modeling None of the given options Question # 4 of 10 ( Start time: 09:51:04 PM ) Total Marks: 1 Identify the TRUE statement: Select correct option: The data value increases as volume decreases   (Correct) The data value decreases ...

CS614 Quiz No.1 Shared by Manzar (UnSolved)

Question # 1 of 10 ( Start time: 03:35:24 PM )   Total Marks: 1 MDX by Microsoft is an example of _______ Select correct option: HOLAP DOLAP ROLAP None of the given options Question # 2 of 10 ( Start time: 03:36:40 PM )   Total Marks: 1 In decision support system ease of use is achieved by: Select correct option: Normalization Denormalization Drill up Drill down Question # 3 of 10 ( Start time: 03:38:07 PM )   Total Marks: 1 Which of the denormalization technique squeezes master table into detail? Select correct option: Pre-joining Horizontal splitting Vertical splitting Adding redundant column Question # 4 of 10 ( Start time: 03:38:28 PM )   Total Marks: 1 The trade-offs of denormalization is/are: Select correct option: Storage Performance Ease-of-use All of the given options Question # 5 of 10 ( Start time: 03:38:46 PM )   Total Marks: 1 ________is usually deployed when expressions can be used to group data together in...