Monday, March 23, 2015

The various types of predefined exception classes



Java defines several exception classes inside the standard package java.lang.
The most general of these exceptions are subclasses of the standard type RuntimeException. Since java.lang is implicitly imported into all Java programs, most exceptions derived from RuntimeException are automatically available.
Java defines several other types of exceptions that related to its various class libraries. Following is the list of Java Unchecked RuntimeException.

Exception
Description
ArithmeticException
Arithmetic error, such as divide-by-zero.
ArrayIndexOutOfBoundsException
Array index is out-of-bounds.
ArrayStoreException
Assignment to an array element of an incompatible type.
ClassCastException
Invalid cast.
IllegalArgumentException
Illegal argument used to invoke a method.
IllegalMonitorStateException
Illegal monitor operation, such as waiting on an unlocked thread.
IllegalStateException
Environment or application is in incorrect state.
IllegalThreadStateException
Requested operation not compatible with current thread state.
IndexOutOfBoundsException
Some type of index is out-of-bounds.
NegativeArraySizeException
Array created with a negative size.
NullPointerException
Invalid use of a null reference.
NumberFormatException
Invalid conversion of a string to a numeric format.
SecurityException
Attempt to violate security.
StringIndexOutOfBounds
Attempt to index outside the bounds of a string.
UnsupportedOperationException
An unsupported operation was encountered.

The following is the list of Java Checked Exceptions Defined in java.lang.
Exception
Description
ClassNotFoundException
Class not found.
CloneNotSupportedException
Attempt to clone an object that does not implement the Cloneable interface.
IllegalAccessException
Access to a class is denied.
InstantiationException
Attempt to create an object of an abstract class or interface.
InterruptedException
One thread has been interrupted by another thread.
NoSuchFieldException
A requested field does not exist.
NoSuchMethodException
A requested method does not exist.



Thursday, March 19, 2015

4th Generation Techniques in Software Engineering


                         Software Engineering- Fourth Generation Techniques



             Implementation using a 4GL(4th Generation Techniques) enables the software developer to represent desired results in a manner that leads to automatic generation of code to create those results. Obviously, a data structure with relevant information must exist and be readily accessible by the 4GL. To transform a 4GT implementation into a product, the developer must conduct thorough testing, develop meaningful documentation, and perform all other solution integration activities that are required in other software engineering paradigms. In addition, the 4GT developed software must be built in a manner that enables maintenance to be performed expeditiously.


Software development environment that supports the 4GT paradigm includes some or all of the following tools: 
1) Non-procedural languages for database query 
2) Report generation 
3) Data manipulation
4) Screen interaction and definition
5) Code generation and High-level graphics capability 
6) Spreadsheet capability 
7) Automated generation of HTML and similar languages used for Web-site creation using advanced software tools.


Pros and Cons Proponents claim dramatic reduction in software development time and greatly improved productivity for people who build software. Opponents claim that current 4GT tools are not all that much easier to use than programming languages, that the resultant source code produced by such tools is "inefficient" and that the maintainability of large software systems developed using 4GT is open to question.


Advantages: 
 Simplified the programming process.
 Use non-procedural languages that encourage users and programmers to specify the results they want, while the computers determines the sequence of instruction that will accomplish those results. 
 Use natural languages that impose no rigid grammatical rules. 

Disadvantages: 
 Less flexible that other languages 
 Programs written in 4GLs are generally far less efficient during program execution that programs in high-level languages. 

Therefore, their use is limited to projects that do not call for such efficiency.