Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :
help.mbaassignments@gmail.com
or
call us at : 08263069601
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 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 syntaxisasfollows:
2. If givenconditionisTRUE, expr_set1will getexecuted.
If givenconditionisFALSE(notTRUE),
2 List and explainall the string comparison functions.Write a program in java 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 eachenumconstant.
3 Describe with the helpof an example the implementationofinheritance injava.
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
inheritsall fieldsandmethodsof itssuperclass.InJava,only
3. 5 Draw and Explainthe Life cycle of a java appletwith 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
depictedinthe figure below:
Initial State
Whena newappletisborn or created,itis
6 Define java beansand 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,
whichaimsto create reusable software componentsforJava.
Advantages:
Dear students get fully solved assignments
Send your semester & Specialization name to our mail id :