BT0074, OOPS with JAVA

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
3
SUBJECT CODE & NAME
BT0074, OOPS with JAVA
CREDIT
4
BK ID
B1002
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.

1 What are the keywords that java supports? Describe the data types available in java programming language.
Answer: In the Java programming language, a keyword is one of 50 reserved words that have a predefined meaning in the language; because of this, programmers cannot use keywords as names for variables, methods, classes, or as any other identifier. Due to their special functions in the language, most integrated development environments for Java use syntax highlighting to display keywords in a different color for easy identification.


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:



3 Describe with the help of an example the implementation of inheritance in java.
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 another class becomes Child of the class it extends and inherit all its functionality which is not private


4 Describe the catch and finally block statement in java 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
·          
·          

5 Draw and Explain the Life cycle of a java applet with an example.
Answer:
/*
        Applet Life Cycle Example
        This java example explains the life cycle of Java applet.
*/

import java.applet.Applet;
import java.awt.Graphics;



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:
·         The properties, events, and methods of a


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.