MCS-024 ASSIGNMENT SOLUTION (2020-21)- ignou solved assignments 2021

 

Dear students, get fully  solved assignments by professionals

Do send your query at :

help.mbaassignments@gmail.com

 

or call us at :08263069601

 

BCA 4TH SEMESTER

MCS-024 ASSIGNMENT SOLUTION (2020-21)

 

 

Q1. a) What is Object Oriented Programming (OOP)? Explain its advantages. Also describe concept of data hiding in OOP.

Answer : - Object-Oriented Programming is a methodology or paradigm to design a program using classes and objects. It simplifies the software development and maintenance by providing some concepts :

  • Object - Any entity that has state and behavior is known as an object. An Object can be defined as an instance of a class.
  • Class - Collection of objects is called class. It is a logical entity. A class can also be defined as a



Q1. b) Explain different data types available in Java.

Answer : - In Java data types are divided into two groups :

  • Primitive data types - includes byte, short, int, long, float, double, boolean and char
  • Non-primitive data types - such as String, Arrays and Classes

Primitive Data Types



 

Q1. c) Describe features of Java programming language.

Answer : - The primary objective of Java programming language creation was to make it portable, simple and secure programming language. Apart from this, there are also some excellent features which play an important role in the popularity of this language.

A list of

 

Q2. a) What is a class? Define a class in Java and with the help of that class describe meaning of data members and member functions. Also describe use of different types of access spcifiers available in Java.

Answer : -

  • A Class is a user defined data-type which have data members and member functions.
  • Data members are the data variables and member functions are the functions used to manipulate these variables and together these data members and member functions defines the properties and behavior


Q2. b) Describe advantages of abstract method. Write a java program to create a Shape class with an abstract method Find_Area( ). Inherit Circle and Rectangle classes from Shape class. Implement Find_Area( ) method in derived classes. Make necessary assumptions.

Answer : - A method which is declared as abstract and does not have implementation is known as an abstract method.

Example : abstract void printStatus( ); // No Method Body

If a class includes abstract methods, then the class itself must be declared abstract.

Abstraction is a





Q3. a) Explain use(s) of following keywords of Java with the help of program/example.

       i.            final

   ii.            finally

iii.            super

Answer : -

final Keyword

  • Final is a keyword or non-access modifier in java.
  • It can be apply with class, variables, and methods.
  • If you make any




Q3. b) What is interface? How interface is different from abstract class? Write a program in Java to explain how interfaces are implemented.

Answer : - Like a class, an interface can have methods and variables, but the methods declared in interface are by default abstract (only method signature, no body). Interfaces specify what a class must do and not how.

A class that is declared with abstract keyword, is known as abstract class in java. It can have abstract and non-abstract methods (method with body). Method that are declared without any body within an abstract class are called abstract method. The method body will be defined by its subclass. Abstract method can never be final and static. Any class that extends

 

Q4. a) What is polymorphism? Explain use of polymorphism in java programming.

Answer : - Polymorphism in Java is a concept by which we can perform a single action in different ways. There are two types of polymorphism in Java : compile-time polymorphism and runtime polymorphism.

Run time Polymorphism also known as method overriding. Method overriding means having two or more methods with the same name, same signature but with different implementation.

Compile time Polymorphism also known as method overloading. Method overloading means having two or more methods with the same name but



Q4. b) What is exception? What are different types of exceptions? Explain need of exceptions handling with the help of a program.

Answer : - Exceptions are events that occur during the execution of programs that distrup the normal flow of instructions (example - divide by zero, array access out of bound, etc.).

In Java, an exception is an object that wraps an error event that occurred within a method and contains :

  • Information about the error including its type
  • The state of the program when the error occurred
  • Optionally, other custom




Q5. a) What is multithreading? Explain advantages of multithreading. Describe use of setPriority and getPriority methods for Java multithreading. Also describe how threads are synchronized in Java with the help of a program.

Answer : - Multithreading in java is a process of executing multiple threads simultaneously. Thread is basically a lightweight sub-process, a smallest unit of processing. Multiprocessing and multithreading, both are used to achieve multitasking.

We use multithreading than multiprocessing because threads share a common memory area. They do not allocate separate memory area so saves memory, and context-switching between the threads takes less time than process. Java Multithreading is mostly





Q5. b) Write program to create an Applet which draw a circle inside a triangle. Keep color of circle blue and triangle yellow.

Answer : -

 

Q6. a) What is layout manager? Describe use of flow layout and grid layout with the help of program code.

Answer : - 





Q6. b) What is event driven program? Describe different components of event in Java

Answer : - 




Q7. a) Explain use of stream classes in Java. Write a java program to read the contents of a given file and display it.

Answer : -

Java Stream Class

  • Byte Stream

1.       InputStream

§  FileInputStream

§  ByteArrayInputStream

§  ObjectInputStream

§  PipedInputStream

 



Q7. b) Explain use of Socket and DatagramPacket classes.

Answer : - 

 



Q8. a) What is Servlet ? Explain Servlet life cycle. Also explain use of GET and POST methods of Servlet.

Answer : - Servlet can be described in many ways, depending on the context.

  • Servlet is a technology which is used to create a web application.
  • Servlet is an API that provides many interfaces and classes including documentation.
  • Servlet is an interface that must be implemented for creating any Servlet.
  • Servlet is a class that extends the capabilities of the servers and responds to the incoming requests. It can



Q8. b) What is JDBC? Explain how connection is established in JDBC.

Answer : - JDBC stands for Java Database Connectivity. JDBC is a Java API to connect and execute the query with the database. It is a part of JavaSE (Java Standard Edition). JDBC API uses JDBC drivers to connect with the database. There are four types of JDBC drivers :

JDBC-ODBC Bridge Driver

The JDBC Type 1 driver converts JDBC method calls




Q8. c) What is RMI? Explain RMI architecture.

Answer : - The RMI (Remote Method Invocation) is an API that provides a mechanism to create distributed application in java. The RMI allows an object to invoke methods on an object running in another JVM.

The RMI provides remote communication between the applications using two objects stub and skeleton. RMI uses stub and skeleton object for communication with the remote object. A remote object is an object whose method can be invoked from another JVM.

  • Stub - The stub is an object, acts as a gateway for the client side. All the outgoing requests are routed through it. It resides at the client side

 

 

Dear students, get fully  solved assignments by professionals

Do send your query at :

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.