Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
(SPRING 2014) ASSIGNMENT
DRIVE WINETR | SPRING 2014 |
PROGRAM | BSc IT |
SUBJECT CODE & NAME | BT0074 – OOP with JAVA |
SEMESTER | Third |
BK ID | B1005 |
CREDITS | 4 |
MARKS | 60 |
1. Explain any ten features or buzzwords of java programming language.
Answer : Java is born with some unique and interesting features that made it most powerful and demanded language of the times. Following are the features of Java.
1) Portable
Portability for Java comes from its bytecode. A Java .class file, obtained from the compilation on one platform can be ported or carried, for execution, to a different platform. The necessity is to have a compatible JVM (specific to the platform). JDKs are different for different platforms.
2.Describe the syntax and working of if-else with an example. Also write a program in java that assigns a grade based on the value of a test score: an A for a score of 90% or above, a B for a score of 80% or above, and so on.
Answer : General if..else syntax is as follows:
if ( condition ) {
expr_set1;
}
3. List and explain all the string comparison functions. Write a program in java to reverse a string.
Answer : String comparison functions
Function | Description |
addcslashes() | Returns a string with backslashes in front of the specified characters |
addslashes() | Returns a string with backslashes in front of predefined characters |
bin2hex() | Converts a string of ASCII characters to hexadecimal values |
4. Describe the try block and nested try statement – the technique of handling exception in java. Explain with the help of a program.
Answer : The first step in constructing an exception handler is to enclose the code that might throw an exception within a try block. In general, a try block looks like the following:
try { code}catch and finally blocks . . .
The segment in the example labeled code contains one or more legal lines of code that could throw an exception. (The catch and finally blocks are explained in the next two subsections.)
5. Write a note on random access files and serialization in java.
Answer : Random Access Files
Random access files permit nonsequential, or random, access to a file’s contents. To access a file randomly, you open the file, seek a particular location, and read from or write to that file.
This functionality is possible with the SeekableByteChannel interface. The SeekableByteChannel interface extends channel I/O with the notion of a current position. Methods enable you to set or query the position, and you can then read the data from, or write the data to, that location. The API consists of a few, easy to use, methods:
6.Define and explain JDBC. Draw and explain JDBC application architecture.
Answer : JDBC Architecture
The JDBC API supports both two-tier and three-tier processing models for database access.
Figure 1: Two-tier Architecture for Data Access.
The DBMS-proprietary protocol provides two-way communication between the client machine and the database server
In the two-tier model, a Java application talks directly to the data source. This requires a JDBC driver that can communicate with the particular data source being accessed. A user’s commands are delivered to the
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
(Prefer mailing. Call in emergency )
Wonderful