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
|
BSc
IT
|
SEMESTER
|
THIRD
|
SUBJECT
CODE & NAME
|
BT0074,
OOPS with JAVA
|
BK
ID
|
B1002
|
CREDIT
|
4
CREDITS
|
MAX.
MARKS
|
60
|
1
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 given condition is TRUE, expr_set1 will
get executed.
If given condition is FALSE (not TRUE),
2
List and explain all the string comparison functions. Write a program in java
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.
|
3
Describe with the help of an example the implementation of inheritance in java.
Answer: The most fundamental element of
Java is the class. A class represents an entity and also, defines and
implements its functionality. In Java, classes can be derived from other
classes, in order to create more complex relationships. A class that is derived
from another class is called subclass and inherits all fields and methods of
its superclass. In Java, only
5
Draw and Explain the Life cycle of a java applet with an example.
Answer: Java applet inherits features from
the class Applet. Thus, whenever an applet is created, it undergoes a series of
changes from initialization to destruction. Various stages of an applet life
cycle are depicted in the figure below:
Initial
State
When a new applet is born or created, it
is
6
Define java beans and beanbox. Describe the advantages of java beanbox.
Answer: In computing based on the Java
Platform, JavaBeans are classes that encapsulate many objects into a single
object (the bean). They are serializable, have a zero-argument constructor, and
allow access to properties using getter and setter methods. The name
"Bean" was given to encompass this standard, which aims to create
reusable software components for Java.
Advantages:
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.