Saturday, March 1, 2025

OOPS

  paradigm refers to a style or approach to solving problems and organizing code in a particular way. It dictates how developers think about and structure their code and solutions.

there are 3 types of paradigm.

  1. pop
  2. structured
  3. oop
      1. POP:It is a conventional or old method of programming, in which the program is written into many small parts and combined together. In this approach, the functions are created and the data is not very crucial. Variables are created for the data handling and they are treated as the global and local variables. Creation of the variables inside of the sub programs is known as local variable and the creation of the variables in the main module is called the global variable. Global variables can be accessed from any modules but the local variables can be accessed only within the local modules. The alteration of data is very high.

 

1.   What are the features of Procedure Oriented Programming?

The characteristics or features are as follow:

  1. a)  A large program is broken down into small programs or procedures.
  2. b)  It focuses on the functions rather than the data.
  3. c)  Variables are created as local and global.
  4. d)  The possibility of data alteration is very high, which is the main disadvantage of this approach.
  5. e)  It follows top down method.

 

2.   What is Object Oriented Programming?

It is a modern approach of programming. It is highly known as OOP in short form. In this method, all the real world entities are treated as the objects and objects are collected in a class. Even the classes are controlled by the Super class. And by the inheritance feature, the changes on the super class are easily passed to its sub classes. Similarly, it was developed to overcome procedure oriented programming method and the data is given high priority rather than the functions. Data can be hidden, so that the possibility of data alteration is very less.

 3.   What are the characteristics of OOP?

  • a)  Emphasis is given to the data.
  • b)  Program are divided into multiple objects.
  • c)  Functions and data are tied together in a single unit.
  • d)  Data can be hidden to prevent accidental alteration.
  • e)  It follows the bottom up approach.

  1. 4.  What are the differences between Procedure Oriented and Object Oriented Programming?

    Procedure Oriented

    Object Oriented

    1. Emphasis is given to procedures.

    1. Emphasis is given to data.

    2. Programs are divided into multiple modules.

    2. Programs are divided into multiple objects.

    3. It follows top-down method.

    3. It follows bottom-up method.

    4. Generally data cannot be hidden.

    4. Data can be hidden.

    5. It does not model the real world perfectly.

    5. It models the real world perfectly.

    6. Maintenance is difficult.

    6. Maintenance is easy.

    7. Code reusability is difficult.

    7. Code reusability is easy.

    8. Examples: FORTRAN, COBOL, Pascal, C, etc.

    8. Examples: C++, JAVA, Smalltalk, etc.

     

    CONCEPTS OF OOPS

    a)   Object:All the entities of a program used in OOP method are called objects. Here entities represent a group of people, teachers, students, books, cars, etc. Each entity or object does have an attribute called characteristics and the behavior or functions. For example, a car can be an object. The colour like blue, black, size, weight, etc. are the attributes or the characteristics, which distinguishes to it with other objects and move, turn, etc. can be the functions.

  2. b)  Class:Class is a user defined data type in OOP, which defines the data types for all the objects, which run under it. Or it collects the objects of its similar data types. For example, a class vehicle can have the objects like car, bus, truck, etc. Similarly a class school can have students, teachers, staff, etc.

    c)   Abstraction:It is a feature of hiding internal detail of any object. It provides only the interface to the user, which makes them easy to use but does not show the details of that object, how that works and how that is made. Due to this feature, OOP has become very secure platform for its data from being accidental alteration.

    d)  Encapsulation:It is a process of combining the data and functions together. OOP gives more emphasis on the data rather than the functions or procedures. Many functions can use the same data but the instruction given to the function to use any particular data and combining them together is the encapsulation. Due to its unrelated functions cannot use unnecessary data in the program.

    e)   Inheritance:Inheritance is the process of creating new classes based on the existing class. The new classes require the features of the main class called the Super class and it is provided through the feature called Inheritance. By the Inheritance feature Super class can coordinate with it’s sub classes. It models the real world. It allows the extension and reuse of existing code without having to rewrite for the new created classes.

  3. f) Polymorphism:It is a feature of OOP, which refers to the way of operating the same operator in different ways and different method or purpose. Operator overloading and the operation overloading are the examples or Polymorphism. For example ‘+’ operator can be used for arithmetic operation and string concatenation both. This facility or feature is an example of Polymorphism. It reduces the number or keywords or operators.

  4.     What are the advantages and disadvantages of OOP? Advantages

a)  Code repetition is reduced by the various techniques like inheritance.

b)  Data is more secure due to the data hiding feature called abstraction.

c)  Existing classes can serve as library class for further enhancements.

D)  Division of a program into multiple objects makes the software development easier.

e)  Software complexity is less.

f)  Upgrading and maintenance of software is easy.

g)  It perfectly models the real world system.

h)Code re-usability is much easier than the conventional programming system.

 

    Disadvantages

  1. a)  Compiler and runtime overhead is high.

    b)  Software developer should analyze the problem in object oriented way.

    c)  Requires the mastery in software engineering and programming methodology.

    d)  Useful only for the large and complex projects.

     

  2. Application of OOP

  3. 1.      Expert System

    2.      Artificial intelligence

    3.      Management information systems.

    4.      Decision support system.

    5.      Computer based training and education

    6.      Object- oriented database.

    7.      Computer games.

    8.      Mobile applications.

    9.      Internet based applications.

    10. Designing user interface for software.

    11.   Security System.

Sunday, April 28, 2024

some objectives with answer

 

  1. What does the JavaScript NaN stand for? A) Not a Null B) Not a Name C) Not a Number D) Not a Node

  2. Which operator is used to concatenate strings in JavaScript? A) + B) & C) * D) /

  3. Which method is used to convert a string to lowercase in JavaScript? A) toLowerCase() B) toUpperCase() C) lowerCase() D) upperCase()

  4. Which layer of the OSI model is responsible for establishing, maintaining, and terminating connections between applications? A) Network Layer B) Transport Layer C) Session Layer D) Presentation Layer

  5. Which layer of the OSI model provides services like file transfer and email? A) Network Layer B) Application Layer C) Transport Layer D) Data Link Layer

  6. Which layer of the OSI model is responsible for routing and forwarding packets between networks? A) Physical Layer B) Data Link Layer C) Network Layer D) Transport Layer

  7. What is the primary purpose of Packet Tracer? A) Network monitoring B) Network simulation and visualization C) Network security analysis D) Network troubleshooting

  8. In Packet Tracer, which tool can you use to test connectivity between network devices? A) PDU (Protocol Data Unit) Generator B) Packet Analyzer C) Ping D) Traffic Generator

  9. What is the primary purpose of the Ping utility? A) Measure network bandwidth B) Test network connectivity C) Analyze network traffic D) Monitor network security

OOPS

   paradigm refers to a style or approach to solving problems and organizing code in a particular way. It dictates how developers think abo...