Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
“
help.mbaassignments@gmail.com ”
or
Call
us at : 08263069601
ASSIGNMENT
PROGRAM
|
BScIT
|
Semester
|
3
|
SUBJECT
CODE & NAME
|
BT0074,
OOPS with JAVA
|
CREDIT
|
4
|
BK
ID
|
B
1002
|
MAX.MARKS
|
60
|
Note:
Answer all questions. Kindly note that answers for 10 marks questions should be
approximately of 400 words. Each question is followed by evaluation scheme.
Question1.
Describe the features of java programming language.
Answer: Various features of programming
language are:
Simple:
·
Java is Easy to write and more
readable and eye catching.
·
Java has a concise, cohesive
set of features that makes it easy to learn and use.
·
Most of the concepts are drew
from C++ thus making Java learning simpler.
Secure
:
Question2.
Explain any four function can be used for string comparison. Write a program to
reverse a string.
Answer: String Comparison Functions are :
Comparison
|
Primitives
|
Objects
|
a
== b, a != b
|
Equal
values
|
Compares references, not values. The use
of == with object references is generally limited to the following:
·
Comparing to see if a
reference is null.
·
Comparing two enum values.
This works because there is only one object for each enum constant.
|
Question
3. Describe with the help of an example the implementation of inheritance.
Answer: : Inheritance in Java is an Object
oriented or OOPS concepts, which allows to emulate real world Inheritance
behavior, Inheritance allows code reuse in Object oriented programming language
e.g. Java. Along with Abstraction, Polymorphism and Encapsulation, Inheritance
forms basis of Object oriented programming. Inheritance is implemented using
extends keyword in Java and When one Class extends another Class it inherit all
non private members including fields and methods. Inheritance in Java can be
best understand in terms of Parent and Child class, also known as Super class
and Sub class in Java programming language. The class which extends
Question
4. Describe the catch and finally block statement with examples.
Answer:
·
A finally statement must be associated
with a try statement. It identifies a block of statements that needs to be
executed regardless of whether or not an exception occurs within the try block.
·
After all other try-catch
processing is complete, the code inside the finally block executes. It is not
mandatory to include a finally block at all, but if you do, it will run
regardless of whether an exception was thrown and handled by the try and catch
parts of the block.
·
In normal execution the finally
block is executed after try block. When any exception occurs first the catch
block is executed and then
Question
5. Write a note on random access files and serialization concept.
Answer: Serialization with a random access
file, but have to build the
infrastructure yourself. There is no way to get the size of serialization
without actually serializing.
We
want to store multiple serialized objects in the same file, so you'll
need to do something like:
·
Store the serialized objects,
keeping track of the offsets within the stream until the end, and then write a
table of contents at the end of the file. This is similar to the zip file
format.
·
Write "placeholder"
bytes for the size, then
2.
The JDBC URL
Answer: The programming involved to
establish a JDBC connection is fairly simple. Here are these simple four steps
−
Import
JDBC Packages: Add import statements to your Java
program to import required classes in your Java code.
3.
The ResultSet Object
Answer: The SQL statements that read data
from a database query, return the data in a result set. The SELECT statement is
the standard way to select rows from a database and view them in a result set.
The java.sql.ResultSet interface represents the result set of a database query.
A ResultSet object maintains a cursor that
points to the current row in the result set. The term "result set"
refers to the row and column data contained in a ResultSet object.
The
methods of the ResultSet interface can be
4.
Using the PreparedStatement Object
Answer: Once a connection is obtained we
can interact with the database. The JDBC Statement, CallableStatement, and
PreparedStatement interfaces define the methods and properties that enable you
to send SQL or PL/SQL commands and receive data from your database.
They also define methods that help bridge
data type differences between Java and SQL data types used in a database.
Dear
students get fully solved assignments
Send
your semester & Specialization name to our mail id :
“
help.mbaassignments@gmail.com ”
or
Call
us at : 08263069601
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.