Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
“ help.mbaassignments@gmail.com ”
or
Call us at : 08263069601
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Bt0074, oops with java
1. 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 questionis followedbyevaluationscheme.
Question1.Describe the features of java programming language.
Answer:Variousfeaturesof programminglanguage are:
Simple:
Java isEasy to write andmore readable andeye catching.
Java hasa concise,cohesivesetof featuresthatmakesiteasytolearnand use.
Most of the conceptsare drewfromC++ thusmakingJavalearningsimpler.
Secure :
2. Question2. Explain any four function can be used for string comparison. Write a program to reverse a
string.
Answer:StringComparisonFunctionsare :
Comparison Primitives Objects
a == b, a != b Equal values Compares references, not values. The use of == with object
referencesisgenerallylimitedtothe following:
Comparingtosee if a reference isnull.
Comparing twoenum values. This works because there
isonlyone objectfor each enumconstant.
Question3. Describe withthe helpof an example the implementationofinheritance.
Answer: : Inheritance in Java is an Object oriented or OOPS concepts, which allows toemulate 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
programminglanguage.The classwhichextends
Question4. Describe the catch and finallyblock statementwith examples.
Answer:
A finally statement must be associated with a try statement. It identifies a block of statements
that needstobe executedregardlessof whetherornotan exceptionoccurswithinthe tryblock.
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
exceptionwasthrownandhandledbythe tryand catch parts of the block.
In normal execution the finally block isexecuted after try block. When any exception occurs first
the catch blockisexecutedandthen
3. Question5. Write a note on random access filesand serializationconcept.
Answer: Serialization with a random access file, but have to build the infrastructure yourself. There is no
wayto get the size of serializationwithoutactuallyserializing.
We wantto store multipleserializedobjectsinthe same file,soyou'll needtodosomethinglike:
Store the serialized objects, keeping track of the offsets within the stream until the end, and
thenwrite a table of contentsat the endof the file.Thisissimilartothe zipfile format.
Write "placeholder"bytesforthe size,then
2. The JDBC URL
Answer: The programminginvolved toestablish a JDBC connection isfairly simple. Here are these simple
foursteps−
Import JDBC Packages: Add import statements to your Java program to import required classes in your
Java code.
3. The ResultSetObject
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.ResultSetinterfacerepresentsthe resultsetof a database query.
A ResultSet object maintains a cursor that points to the current row in the result set. The term "result
set"referstothe rowand columndata containedina ResultSetobject.
The methodsof the ResultSetinterface can be
4. 4. Usingthe PreparedStatementObject
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
youto sendSQL or PL/SQL commandsand receive datafromyourdatabase.
They also define methods that help bridge data type differences between Java and SQL data types used
ina 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