Wednesday, 25 January 2017

Java |Java Constructures|Exception Handling In Java|Array|JVM|Java bytecode|Why Choose Java? Java was designed with a few key principles in mind:


Java
Java is a programming language and computing platform first released by Sun Microsystems in 1995. There are lots of applications and websites that will not work unless you have Java installed, and more are created every day. Java is fast, secure, and reliable.
Java Constructures
  Constructors are required to create objects for a class. Constructors are used to initialize the instance variables of an object.
  Constructor declaration looks like method declaration. It must have the same name as that of the class and have no return type.
  Constructors can be classified into two types, default constructors and parametarized constructors.
  If you don't define a constructor, then the compiler creates a default constructor. Default constructors do not contain any parameters. Default constructors are created only if there are no constructors defined by us.
  Prametarized constructors are required to pass parameters on creation of objects. We can overload constructors with different datatypes as its parameters.
  Use 'this()' to communicate from one constructor to another constructor in the same class.

Exception Handling In Java
  • In exception is an event, which occurs during the execution of a program, that interrupts the normal flow of the program. It is an error thrown by a class or method reporting an error in code.
  • The 'Throwable' class is the superclass of all errors and exceptions in the Java language
  • Exceptions are broadly classified as 'checked exceptions' and 'unchecked exceptions'. All RuntimeExceptions and Errors are unchecked exceptions. Rest of the exceptions are called checked exceptions. Checked exceptions should be handled in the code to avoid compile time errors.
  • Exceptions can be handled by using 'try-catch' block. Try block contains the code which is under observation for exceptions. The catch block contains the remedy for the exception. If any exception occurs in the try block then the control jumps to catch block.
  • If a method doesn't handle the exception, then it is mandatory to specify the exception type in the method signature using 'throws' clause.
  • We can explicitly throw an exception using 'throw' clause.

Array
  • An array is a group of same kind of variables and can be accessible by a common name.
  • In java arrays are objects.
  • Any element in the array can be accessed by its index.
  • Arrays can be one dimensional or multi-dimensional.
JVM
JVM (Java Virtual Machine) is an abstract machine. It is a specification that provides runtime environment in which java bytecode can be executed.

Java bytecode
Java bytecode is the instruction set of the Java virtual machine. Each bytecode is composed of one, or in some cases two bytes that represent the instruction (opcode), along with zero or more bytes for passing parameters.

Why Choose Java?

Java was designed with a few key principles in mind:
·         Easy to Use: The fundamentals of Java came from a programming language called c++. Although c++ is a powerful language, it was felt to be too complex in its syntax, and inadequate for all of Java's requirements. Java built on, and improved the ideas of c++, to provide a programming language that was powerful and simple to use.

·         Reliability: Java needed to reduce the likelihood of fatal errors from programmer mistakes. With this in mind, object-oriented programming was introduced. Once data and its manipulation were packaged together in one place, it increased Java’s robustness.

·         Secure: As Java was originally targeting mobile devices that would be exchanging data over networks, it was built to include a high level of security. Java is probably the most secure programming language to date.

·         Platform Independent: Programs needed to work regardless of the machine they were being executed on. Java was written to be a portable language that doesn't care about the operating system or the hardware of the computer.


Thursday, 19 January 2017

Android | Android Architecture | Application Components

Android
. Android is a software bunch comprising not only operating system but also middleware and key applications. Android is a powerful Operating System supporting a large number of applications in Smart Phones. These applications make life more comfortable and advanced for the users.:
Android - Architecture

Linux kernel

 This provides a level of abstraction between the device hardware and it contains all the essential hardware drivers like camera, keypad, display etc. Also, the kernel handles all the things that Linux is really good at such as networking and a vast array of device drivers, which take the pain out of interfacing to peripheral hardware.

Libraries

Top of Linux kernel there is a set of libraries including open-source Web browser engine WebKit, well known library libc, SQLite database which is a useful repository for storage and sharing of application data, libraries to play and record audio and video, SSL libraries responsible for Internet security etc.

Android Libraries

This category encompasses those Java-based libraries that are specific to Android development. Examples of libraries in this category include the application framework libraries in addition to those that facilitate user interface building, graphics drawing and database access. A summary of some key core Android libraries available to the Android developer is as follows −
·        android.app − Provides access to the application model and is the cornerstone of all Android applications.
·        android.content − Facilitates content access, publishing and messaging between applications and application components.
·        android.database − Used to access data published by content providers and includes SQLite database management classes.
·        android.opengl − A Java interface to the OpenGL ES 3D graphics rendering API.
·        android.os − Provides applications with access to standard operating system services including messages, system services and inter-process communication.
·        android.text − Used to render and manipulate text on a device display.
·        android.view − The fundamental building blocks of application user interfaces.
·        android.widget − A rich collection of pre-built user interface components such as buttons, labels, list views, layout managers, radio buttons etc.
·        android.webkit − A set of classes intended to allow web-browsing capabilities to be built into applications.

Android Runtime

This section provides a key component called Dalvik Virtual Machine which is a kind of Java Virtual Machine specially designed and optimized for Android.
The Dalvik VM makes use of Linux core features like memory management and multi-threading, which is intrinsic in the Java language. The Dalvik VM enables every Android application to run in its own process, with its own instance of the Dalvik virtual machine.
The Android runtime also provides a set of core libraries which enable Android application developers to write Android applications using standard Java programming language.

Application Framework

The Application Framework layer provides many higher-level services to applications in the form of Java classes. Application developers are allowed to make use of these services in their applications.
The Android framework includes the following key services −
·        Activity Manager − Controls all aspects of the application lifecycle and activity stack.
·        Content Providers − Allows applications to publish and share data with other applications.
·        Resource Manager − Provides access to non-code embedded resources such as strings, color settings and user interface layouts.
·        Notifications Manager − Allows applications to display alerts and notifications to the user.
·        View System − An extensible set of views used to create application user interfaces.


Application Components
Application components are the essential building blocks of an Android application. These components are loosely coupled by the application manifest file AndroidManifest.xml that describes each component of the application and how they interact.

Activities

An activity represents a single screen with a user interface,in-short Activity performs actions on the screen. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. If an application has more than one activity, then one of them should be marked as the activity that is presented when the application is launched.

Services

A service is a component that runs in the background to perform long-running operations. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity.

Broadcast Receivers

Broadcast Receivers simply respond to broadcast messages from other applications or from the system. For example, applications can also initiate broadcasts to let other applications know that some data has been downloaded to the device and is available for them to use, so this is broadcast receiver who will intercept this communication and will initiate appropriate action.
A broadcast receiver is implemented as a subclass of BroadcastReceiver class and each message is broadcaster as an Intent object.

Content Providers

A content provider component supplies data from one application to others on request. Such requests are handled by the methods of the ContentResolver class. The data may be stored in the file system, the database or somewhere else entirely.
A content provider is implemented as a subclass of ContentProvider class and must implement a standard set of APIs that enable other applications to perform transactions.


Sunday, 8 January 2017

ERP ( ENTERPRISE RESOURCE PLANNING)|ERP Trends| BENEFITS OF ERP| Disadvantages|Life Cycle

ERP ( ENTERPRISE RESOURCE PLANNING)

Enterprise resource planning (ERP) is the integrated management of core business processes, often in real-time and mediated by software and technology. These business activities can include:
·         Product planning, purchase
·         Manufacturing or service delivery
·         Marketing and sales
·         Inventory management
·         Shipping and payment
·         Finance
Enterprise ERP Trends
The ERP field can be slow to change, but the last couple of years have unleashed forces which are fundamentally shifting the entire area. The following new and continuing trends affect enterprise ERP software:

1. Mobile ERP 
Executives and employees want real-time access to information, regardless of where they are. It is expected that businesses will embrace mobile ERP for the reports, dashboards and to conduct key business processes.

2. Cloud ERP
The cloud has been advancing steadily into the enterprise for some time, but many ERP users have been reluctant to place data cloud. Those reservations have gradually been evaporating, however, as the advantages of the cloud become apparent.

3. Social ERP
There has been much hype around social media and how important —or not — it is to add to ERP systems. Certainly, vendors have been quick to seize the initiative, adding social media packages to their ERP systems with much fanfare. But some wonder if there is really much gain to be had by integrating social media with ERP.

4. Two-tier ERP
Enterprises once attempted to build an all-encompassing ERP system to take care of every aspect of organizational systems. But some expensive failures have gradually brought about a change in strategy – adopting two tiers of ERP.



BENEFITS OF ERP
Scalability: An ERP system is easily scalable. That means adding new functionality to the system as the business needs change is easy. This could mean easy management of new processes, departments, and more.
Improved reporting: Much of the inefficiency in operational work stems from improper reporting. With an ERP system, this possibility is eliminated as reporting follows an automated template system, allowing various departments to access information seamlessly.
Data quality: As compared with manual record-keeping or other traditional approaches, an ERP system improves data quality by improving the underlying processes. As a result, better business decisions can be reached.
Lower cost of operations: An ERP system introduces fundamental innovations in managing resources, which eliminates delays and thus reduces cost of operations. For instance, use of mobility allows real-time collection of data, which is indispensable to lowering costs.
Better CRM: A direct benefit of using a good ERP system is improved customer relations as a result of better business processes.
Business analytics: Having high-quality data allows businesses to use the power of intelligent analytics tools to arrive at better business decisions. In fact, many good ERP systems have built-in analytics functionality to allow easier data analysis.
Improved data access: Controlling data access properly is always a challenge in organizations. With an ERP system, this challenge is overcome with the use of advanced user management and access control.
Better supply chain: Having the right ERP system in place means improved procurement, inventory, demand forecasting, etc., essentially improving the entire supply chain and making it more responsive.
Regulatory compliance: Having the system in control means organizations can better comply with regulations. Further, the most important and recurring regulatory requirements can be built right into the system.
Reduced complexity: Perhaps the most elegant argument in the favor of ERP systems is that they reduce the complexity of a business and introduce a neatly designed system of workflows. This makes the entire human resource chain more efficient.




Disadvantages
Direct Cost
This is by far the biggest disadvantage to ERP software. The up-front cost of the entire implementation process can be prohibitively high, especially for small-to-medium-sized businesses. This includes the full process of planning, testing, configuring and customizing the software as well as the cost of actual implementation.
Indirect Cost
Financial cost is not the only associated expense with ERP implementation. Businesses must also take into account the opportunity cost of manpower and time necessary for a successful deployment. Planning out a realistic timetable will give you a better idea of whether or not the cost is worth it for your company.
Customization
While this is a potential advantage, it can just as easily become a disadvantage if handled incorrectly. This blog post by expert ERP consultant Eric Kimberling outlines potential problems as well as tips for avoiding the pitfalls of both over-customization and under-customization.

ERP LIFE CYCLE

ERP Implementation Life Cycle is the process of implementation of the enterprise resource planning in any organization. It involves many steps and stages right from the start, planning for project implementation, analysis, design, implementation, transition and operations. ERP implementation lifecycle highlights the different phases of implementing an ERP system. It starts from the projection of the ideal ERP package that is suitable for the company. The steps involved in the life cycle of the ERP implementation are:
  • Selection of packages: This is the first step of the life cycle where the perfect ERP package has to be selected in agreement that fits your business environment. In the selection process, ERP packages that are not suitable they are eliminated. The package has to be carefully selected and testified. The right choice will determine the success of the ERP implementation. A proper study and research should be done before the selection.
  • Project Planning: Proper planning of the implementation process of the project shall be made and designed. Resources should be allocated and the team members have to be selected.
  • Analysis GAP: GAP analysis is an important step in the life cycle of ERP implementation step. GAP analysis is performed to analyze the current situation of the organization and its future position as needed.
  • Re-engineering is needed to make the implementation process involves many changes and alterations. The job responsibilities of employees and the number of employees can be altered as well. This step is done to make the business process more efficient.
  • Training: Training of employees starts with the implementation process in the life cycle of the ERP implementation. Employees of getting used to the new system in order to run the system smoothly later. Get the time at this stage to learn the software and its features and become self-sufficient in order to be able to operate later, when consultants and suppliers to end and go.
  • Testing: Testing is an important step and is carried out so that the errors can be found and resolved before the actual application process.
  • Application: This step is performed when data conversion is done and the work of the database is over. After setup and testing is completed, the actual implementation is done. Once the new system is implemented, the old system is removed. The end user is trained on how to use the new system.
  • Maintenance: Maintenance is carried out in the post-implementation life cycle of ERP implementation phase. The problems are identified and employees learn how to deal with it. Maintenance is also an important stage in the life cycle.



Monday, 2 January 2017

C++ | VARIABLES | OPERATORS |DECISION MAKING | LOOPING|STORAGE CLASSES|FUNCTION|CLASSES|OBJECTS||INLINE FUNCTION|FUNCTION OVERLOADING|STATIC|INHERITENCE


C++
C++, as we all know is an extension to C language and was developed by Bjarne stroustrup at bell labs. C++ is an intermediate level language, as it comprises a confirmation of both high level and low level language features. C++ is a statically typed, free form, multiparadigm, compiled general-purpose language.

C++ CONCEPTS

VARIABLES

Variable are used in C++, where we need storage for any value, which will change in program. Variable can be declared in multiple ways each with different memory requirements and functioning. Variable is the name of memory location allocated by the compiler depending upon the datatype of the variable.

OPERATORS

Operators are special type of functions, that takes one or more arguments and produces a new value. For example : addition (+), substraction (-), multiplication (*) etc, are all operators. Operators are used to perform various operations on variables and constants.

TYPES OF OPERATORS

1.     Assignment Operator
2.     Mathematical Operators
3.     Relational Operators
4.     Logical Operators
5.     Bitwise Operators
6.     Shift Operators
7.     Unary Operators
8.     Ternary Operator
9.     Comma Operator
DECISION MAKING

Decision making is about deciding the order of execution of statements based on certain conditions or repeat a group of statements until certain specified conditions are met. C++ handles decision-making by supporting the following statements,
·         if statement
·         switch statement
·         conditional operator statement
·         goto statement
LOOPING
In any programming language, loops are used to execute a set of statements repeatedly until a particular condition is satisfied.
TYPES OF LOOPING
1.     while loop
2.     for loop
3.     do-while loop
STORAGE CLASSES
Storage classes are used to specify the lifetime and scope of variables. How storage is allocated for variables and How variable is treated by complier depends on these storage classes.
These are basically divided into 5 different types :
1.     Global variables
2.     Local variables
3.     Register variables
4.     Static variables
5.     Extern variables
FUNCTION

Functions are used to provide modularity to a program. Creating an application using function makes it easier to understand, edit, check errors etc.
CALLING A FUNCTION

Functions are called by their names. If the function is without argument, it can be called directly using its name. But for functions with arguments, we have two ways to call them,
1.     Call by Value
2.     Call by Reference
CLASSES
The classes are the most important feature of C++ that leads to Object Oriented programming. Class is a user defined data type, which holds its own data members and member functions, which can be accessed and used by creating instance of that class.
OBJECTS
Class is mere a blueprint or a template. No storage is assigned when we define a class. Objects are instances of class, which holds the data variables declared in class and the member functions work on these class objects.
INLINE FUNCTION
All the member functions defined inside the class definition are by default declared as Inline. Let us have some background knowledge about these functions.
FUNCTION OVERLOADING

If any class have multiple functions with same names but different parameters then they are said to be overloaded. Function overloading allows you to use the same name for different functions, to perform, either same or different functions in the same class.
Function overloading is usually used to enhance the readability of the program. If you have to perform one single operation but with different number or types of arguments, then you can simply overload the function.
STATIC

Static is a keyword in C++ used to give special characteristics to an element. Static elements are allocated storage only once in a program lifetime in static storage area. And they have a scope till the program lifetime. Static Keyword can be used with following,
1.     Static variable in functions
2.     Static Class Objects
3.     Static member Variable in class
4.     Static Methods in class
INHERITENCE
Inheritance is the capability of one class to acquire properties and characteristics from another class. The class whose properties are inherited by other class is called the Parent or Base or Super class. And, the class which inherits properties of other class is called Child or Derived or Sub class.