Wednesday, 25 December 2013

List a few major difference between C++ and Java

There are following some difference between C++ and Java:-

What is multithreading ?How does it improve the performance of the Java?

Multithreading means handing multiple tasks simultaneously,like listing to an audio song while downloading a file from a distent computer.Java support multithreading.Java programs can be written to support multithreading. In Java two programes can be run to do different tasks,like to show the GUI graphics to the user and simultaneously read a file from the hard-disk.So it make the application run smoothly,so that the performance will be better.

How java is more secure than other languages?


Java is more secure because of following reasons:-
  • No use of pointer :-
  •             Java do not use the pointers like other languages c,c++.(pointers are variables which holds the memory addresses).These pointers leads to unauthorized access to the memory blocks if some other program get the pointer values,and can change and manipulate the data stored in the systems RAM.But java does not use the pointers,it has its internal mechanism to manage the memory management .Java give the access to the data to the programs which has proper verified authorization.
  • Concept of error handling and exception handling :-
  •           Java provide the exception handling concept which capture series errors and eliminates any risk of crashing the system.Java compiler check all the code lines and check that if there is any line of code that may create error and give warnings to the programmer like "deprecated methods and classes",so that the more effective program can be written by doing changes in the program .It checks the at the time of execution and may create the exception ArrayIndexOutOfBoundExceptionso that these exceptions can be handled without program crash ,and unauthorised memory contents are not accessible and modifiable by any other programs.
  • Strict Data Type Checking:-Java compiler strictly check the data type that is defined to the variables in the program ,so that there unboxing and unboxing operations can not lead to security issues.Java provide wrapper classes to use in place of primitive data types like Integer class to use instead of int data type ,there are many more.
  • Garbage Collector:-Java has its internal garbage collector that automatically deallocate the variables and objects that go out of scope ,so that the and security issue may lead ,and it also effective to put the memory management task in the hand of Garbage Collector ,because the programmer may do mistake in programming logic(like left destruction of objects and pointers)  that may lead to loophole in the security of program.But java is secure in this case.

Friday, 6 December 2013

Why is Java known as platform-neutral language?

Java is known as platform independent because it uses the concept of  generating the byte code of the high level program ,and then run that byte code(intermediate code) on JVM(Java Virtual Machine),now what is JVM,actual JVM is a virtual computer system that run on your original computer system .
   JVM converts the byte code to machine code according to the your original computer's machine architecture(your computer system architecture like x86,ARM etc.).Here is flow how the Java handle your high level program.



      So java compilation is done only once ,after that the byte code can be interpreted on any machine that have JVM.JVM is of different type according to computer system architecture,means for x86 JVM will be different for ARM JVM will be different etc.These are developed by the java vender that is Oracle.This JVM come as a part of JDK(Java Development Kit).
So this compiler and interpreter has make it platform-neutral language.  

Friday, 6 September 2013

List of a few areas of application of OOP technology


  • Now a days OOP is most popular technology among programmers.It is used in the area of designing of user interface windows of every software .


Like:-


In above the design of textbox labels buttons etc are developed using Object Oriented Programming ,because it easy to co relate there working in the manner of Objects. So today all the software development is done in OOP .



  • Real time systems are much complex and contain many more objectives with complicated attributes and methods. So in real time systems OOP is useful because it can simplify a complex problem.We can create complex objects in OOP and can create there communication methods and can get the results .In the coming post we will create Real time objects and see there working  also.

  • Simulation and modelling applications can be created using OOP because in OOP we can handle real time objects and can generate there behavior  in simulation system also.

  • Object Oriented databases are good application of OOP ,in object oriented databases we can handle objects easily,object data can be processed easily.

  •  There are other applications of OOP are:-
  • AI and expert systems 
  • Neural network 
  • Parallel programming
  • Decision Support Systems
  • CIM
  • CAD etc.

Friday, 30 August 2013

What kind of things can become objects in OOP?

When we start programming in OOP(Object Oriented Programming) the things which have some attributes and have some functions will become objects.Here is a example to check that what will become a object:-

Example :-

       Let say you are going to develop a software for the School to take attendance on computers ,so you will start programming in object oriented .You will analyse that in attendance what are the things which have attributes and some functionality.These things will come in your mind like Student,Teacher,Register etc.
    You will analyse that when attendance is taken the teacher take the attendance ,student speak that I am present and register is used to mark the attendance.





So the Program will have following things:-


class Student
{
     string  sName ;
     int      sRollNo;

}
class Teacher
{
      string TeacherName;
}

class Register
{
        Student   StudentList[20];
}


Tuesday, 16 July 2013

Distinguish between Data Abstraction and Data Encapsulation?

Data Abstraction:-Data abstraction means get the desired things.In data abstraction we use the features which we want ,without worry about the implementation.We have not the information how it will be done?Lets have an of real world example
You usually use mobile phone,when you do a call to your friend.Which steps you take (1)Type the number(2)Press the call button.


But you do not know what happens after that how the mobile implement this task to connect you with your friend..So the mobile has only abstract operation only which are type the number and press the call button.

Same as this example we have function of a object in programming, which done the particular task, these functions will do the task in there internal code only without showing it publicly.

Dummy code example:-
You might listen about the Stack which work on the principle to LIFO(Last In First Out).Stack have two operation PUSH and POP.So this function will do the data abstraction means these will do the internal work without telling the internal implementation.User will just use these two functions to do the task.
class Stack
{
       int numbers[]=new number[10];
       int top;
      Stack()
      {
         top=-1;
       }
      public void PUSH(int num)
      {
        ------------------
       }
       int void POP()
       {
        ------------------
        }

     public static void main(String ar[])
     {
             Stack marks=new Stack();
              marks.PUSH(10);
              marks.PUSH(20);
              int get=marks.POP();
           
}
\Note:-this Example is given to understand the concept only it will not be complied by the compiler.Please do not worry we will do this in proper format when you will have the knowledge about syntax etc in coming posts.



Data Encapsulation:-Data Encapsulation means wrapping the data and methods in a single unit.In programming class do the Encapsulation.Like capsule wrap up the medicine in it.

Example:-

class Chair
{
             int height;
             String color;
              Char()
              {
                 
                }
                public void setColor(String col)
                {
                           color=col;
                }
                ------
                ----------
}

So the Chair class is wrapping up the data members and methods in it

     






Thursday, 4 July 2013

Distinguish between Object and class?


Object:-Object is a entity which remain active in the system(Like we are a object which remain active in the world).The Object can represent a person,a place,a bank account etc which is handle by the program.So in programming every problem is analysed in terms of objects and there nature of communication(Like in world we communicate with others ).So when a program is executed these objects  reaming active in system and interact  by sending messages to each other.Remember that these objects do not know the internal details of each others.Lets take an example how objects communicate:-

Objects Communication

When you go to Bank you have to communicate with some one to get information same as objects communicate with each other to exchange information,like in above example the program(software)developed to manage bank account data,that program will have two objects one will be Customer and other will be Account(remember that at the project level there will be so many objects will be created) and they will communicate to do bank transaction.

Class:-We know every objects have data and methods code  to manipulate the data.(like we have some attributes and functionality).The entire set of data and methods code of an object can be made user defined data type using the class.Once a class is defined we can create any number of objects belonging to that class.Example:-

Class Student
{
      String  Name ;
      int age;
      Student(String nm,int ag)
      {
          Name=nm;
          age=ag;
      }
      public static void main(String arg[])
      {
          Student Steve=new Student("Stave",21);
          Student John=new Student("John",19);
}

So in above example student is a class,Stave and John are objects of Student class

Tuesday, 2 July 2013

What are the advantages of Object Oriented Programming Approach?

There are Following Advantages of Object Oriented Programming:-

  • Using Inheritance we can remove the redundant code and can extends the existing classes.
  • We can develop the programs in standalone modules that communicate with each other to do specific task,so we can start the development from already available code and we do not required to start from scratch.(we will see later how to use the already available code in class packages)
  • Using the principle of data hiding helps the programmers to develop secure programs that cannot hacked.
  • We can add the new features(modules) in a software code ,without effecting the previously working modules.
  • We can match the objects and their working easily.
  • It is easy to understand the working of complex objects in object oriented programming.

Wednesday, 26 June 2013

How are data and methods organized in an object oriented program?


When we talk about object oriented programming we say data and methods but why so?

  •  The answer is that an object has some properties and that properties represent the data.Like
  Example:- Student object has some properties like name,age,roll_no etc so that is data about the  object.
  Lets see with program ,at this time do not bother about the code(if you are beginner):-
   class Student
   {
         String name;
         int age;
         int roll_no;
    }
         So you can see that a student can have name,age,roll_no etc. So this is data about the student.


  • Now second come methods(functions),the methods are the operations which are performed on the data of the object.


Monday, 24 June 2013

What is object oriented programming?


Object oriented programming is  a programming paradigm that represents the concepts as "objects" that has some fields(called attributes) and methods associated procedures called "methods".Objects that are running instances of class ,usually interact with each other ,throughout the application running ,to achieve the desired results. 
I am going to give a example:-
Let say you want to develop a software for the school Management .So how you will start the development?
The answer here will come is that you will look at the problem in real life.

The solution will start by looking at the real life objects and there interaction in the school system.Means you will look at that the objects in the school are:-

Teacher,Student,Accountant,Securityman,Principal,etc.

So you have seen these are the objects which will also remain active in our software.and the software will work as they will interact with each other as they do in real life.

Wednesday, 19 June 2013

Briefly discuss the software evolution during the period from 1950 to 1990?


From the starting of computer invention, many programming approaches have been used by the programmers to write the solution code. These are as following:-

  • Modular Programming
  • Top-Down Programming
  • Bottom-Up Programming
  • Structure Programming

Modular Programming:-In this programming approach the complete code is written in small individual parts or say in this programming approach the complete program is divided in small parts(modules) according to there functionality.This approach helps in maintainability by enforcing the boundaries between the modules.Languages supporting modular Programming are:-AdaAlgolBlitzMaxCOBOLComponent PascalDErlangFFortranHaskell,IBM/360 Assembler etc.You can read about these on Wikipedia links provided on the keywords.



Top-Down Programming:-It is also called step wise design or deductive reasoning.In this approach program development starts by defining the complex pieces and  then these pieces are rewritten to generalize the complex code.So we can say in other word that in top-down programming approach high level of work is defined first and then the low-level inner work)is defined after that.



Bottom-Up Programming:-It is reverse of top-down approach.In this first of all the lowlevel parts of the program are developed and then the complex part are developed from these simple parts.

Tuesday, 18 June 2013

What do you think the major issues facing the software industry today?


Today the software industry is facing the following issues:-
  •          Re usability
  •          Portability
  •          Security
  •          Integrity
  •          Friendliness
  • Re-usability :-In software development it is not a easy task to write a complex software code .It is not enough to put the chain of code together for software development. We need sound structure techniques of code writing, so that code written can be used in other software development also.For re-usability the written code  should be properly documented(documentation techniques) so that when changes are required to reuse the code documentation can help .So re-usability  issue is there. There a a number of programming languages in the market so the new application code that is written should be reusable in the other applications as a add-on feature, we called it plugin, most of the programmers have to create the APIs and web-services so that their application could be integrated with other applications
  • Portability:-Now a days there are variety of devices are available for the communication like smart phone, tablets, smart TV, laptops. So the portability is required in the software,the industry is going to develop .For portability of software industry should take care that weather developers will  write software code differently for different Operating System platforms or developers will write software code once which can run on all Operating System platforms, like using Java that provide platform independent execution. 
  • Security:-We in daily life deal with internet so frequently in this deal we transact with our private information, our bank account information etc. So if we are going to develop a software now a day industry have to keep in mind the security should not lack in any case.When developers develop complex software the software may communicate over the internet with database servers etc ,the internet  is not a secure channel, the  security become a issue for the software development.For this data inscription is one solution but more work is to be done in security issues.
  • Integrity:-When we talk about integrity it mean compact,implies everything should be at one place.The software which you are going to develop it should be integrated with the technology so far we are using, and should fit in the future environment also.Like if the industry is developing a desktop application(software) then it should be keep in mind that application should run on the desktop OS(like on windows OS,Linux OS,Mac OS etc)without any problem.That is challenging issue .
  • Friendliness:-We know that no one want to wast the time in busy life, so when it come to save the time then the first thing that comes in the mind is easy to do the tasks in quick manner.So the software developed should be easy to use and friendliness so that user can interact with it without any essential training.This issue create problems when the software industry's target customers are world wide ,in this type of case the language ,culture differences to interpret the software components etc  are faced by software industry.So The friendliness issue is there that is faced be the software industry.