Sunteți pe pagina 1din 24

CHAPTER ONE 1.1 INTRODUCTION AfroB Bank International Plc is one of Nigerias foremost financial services institutions.

The Bank was incorporated on March 26, 1990 under the Companies & Allied Matters Act (1990) of Nigeria as a private limited liability company and was granted a commercial banking license on April 10 1990. It commenced business on June 12, 1990. Fourteen years later, on June 4, 2004, AfroB Bank converted to a public liability company. Its shares were listed on the Nigerian Stock Exchange on June 25, 2004. 1.2 INFORMATION TECHNOLOGY GROUP The Information Technology Group is responsible for storing information, protecting information, processing the information, transmitting the information, and later retrieving information as necessary. The Information Technology Group has a Mission and a Statement of Value that guides its operation. The Mission Statement and Statement of Value is as follows: 1.2.1 MISSION STATEMENT: To provide excellent and comprehensive services to all our customers in a friendly environment using qualified and experienced personnel and appropriate technology. 1.2.2 STATEMENT OF VALUE: We are committed to the highest legal and ethical principles in the conduct of all aspects of our business. The Bank and each individual who is a part of it will adhere to the highest standards of moral and ethical business conduct and will keep promises, treat each other and our esteemed customers with honesty, civility, and respect. We want to be worthy of the highest trust of those with whom we interact.

1.3 AFROB IT ORGANISATIONAL STRUCTURE


CIO Secretary to CIO

System Engineering

IT Security

IT Services & Support

Business Applications Software Development Implementat ion ATM/System Support Research & Product Dev.

Infrastructure

Core Banking Application EPA/Finacle Scripting Database Engineering Enterprise Server

Network Security Application Security Vulnerability Assessment Incident Handling

App. Support / Testing & Helpdesk


Swift & Messaging Subsidiaries

Hardware Management Power Management Communicat ion Branch Coordination Facilities Management

IT Foreign Operations

1.4 DEFINITION OF KEY OFFICERS AND FUNCTIONS 1.4.1 Head, IT Group/ Chief Information Officer Head, IT Group/Chief Information Officer (CIO) is the overall Head of the Information Technology Group. CIO reports to the Managing Director/Chief Executive Officer and he is responsible for all the Information Technology functions of the bank. The CIO has the corporate responsibility to facilitate the review of the IT Policy document to meet with technological development. 1.4.2 Head, IT Infrastructure Department The Head, IT infrastructure Department shall ensure that IT infrastructure standards are met and maintained for data centers bank-wide. Reports directly to the CIO. 1.4.3 Head, IT Security Department The Head, IT Security Department shall direct, manage, plan and administer the operational and administrative activities associated with the running of the
2

IT Security Department. The Head shall ensure the development, review and documentation of IT policies and procedures; ensures that all systems SLAs are met and maintained as agreed with the IT staff. The Head of the depar tment coordinates the disaster and recovery strategy, ensures that IT policies and procedures are adhered to and complied with by all staff. The head of the department reports directly to the CIO. 1.4.4 Head, System Engineering Department The Head, System Engineering Department reports to the CIO directly and ensures that the Core Banking standards are met and maintained for all core business applications. 1.4.5 Head, IT Services & Support Department The Head, IT Services and Support department shall ensure adequate support of Information Technology services to our primary customers (Users) and Subsidiaries. The Head of the department reports directly to the CIO. The head of the department shall supervise and ensure that the following sub-units are up and running. 1.4.6 Head, Business Application Department The Head, Business Applications Department shall coordinate e-Business products/project implementation, provide leadership, drive and give direction to all e-Business/Business Applications personnel and actively engage in Business development for corporate and individual clients of the bank. The Head of the department reports to the CIO.

CHAPTER TWO 2.1 History of JAVA The microprocessor revolutions most important contribution to date is that it made possible the development of personal computers, which now number about a billion world-wide. Personal computers have profoundly affected peoples lives and the ways organizations conduct and manage their business. Microprocessors are having a profound impact in intelligent consumer-electronic devices. Recognizing this, Sun Microsystems in 1991 funded an internal corporate research project code-named Green, which resulted in a C++-based language that its creator James Gosling, called Oak after an oak tree outside his window as Sun. It was later discovered that there already was a computer language by that name. When a group of Sun people visited a local coffee shop, the name Java was suggested, and it stuck. The Green project ran into some difficulties. The market-place for intelligent consumerelectronic devices was developing in the early 1990s as quickly as Sun had anticipated. The project was in danger of being cancelled. By sheer good fortune, the World Wide Web exploded in popularity in 1993, and the Sun people saw the immediate potential of using Java to add dynamic content, such as interactivity and animations, to web pages. This breathed new life into the project. Sun formerly announced Java at an industry conference in May 1995. Java garnered the attention of the business community because of the phenomenal interest in the World Wide Web. Java is now used to develop large -scale enterprise applications, to enhance the functionality of web servers (the computers that provide the content we see in our web browsers), to provide applications for consumer devices (e.g cell phones, pagers and personal digital assistants) and for many other purposes. Today, Java has become a powerful computer programming language that is fun for novice to learn and appropriate for experienced programmers to use in building substantial information system. 2.2 Hardware and Software Requirement  500Mhz (Minimum) Pentium III or faster processor  Windows 7, Microsoft Windows Server 2003, Windows XP(with service pack 2), Windows 2000 professional (with Service pack 4) or  One of the following Linux distributions: Red Hat Enterprise Linux 3, or Red Hat Fedora Core 3
4

 Minimum of 512Mb of RAM  Java Standard Edition Development Kit (jdk) 6  Minimum 1.5GB of Hard disk space  CD/ROM drive  Internet connection  Web browser, Adobe Acrobat Reader and a zip decompression

2.3 Installing the JAVA Standard Edition Development Kit (JDK) Before an application can be built on Java, the Java Standard Edition Development Kit (JDK) 6 or Java Development Tool that supports Java SE 6. The JDK can also be downloaded from java.sun.com. after downloading the installer, double click the installer program to begin installing the JDK. It is recommended that you accept all the default installation options. 2.4 Setting the PATH Environment Variable After the installation of the JDK, it is important to set the PATH environment variable on the computer which directories the computer searches when looking for applications, such as the applications that enables the compilation and running of java applications called javac.exe and java.exe respectively. 2.5 Setting the PATH Click on Start->Control Panel->System to display the System Properties On the System Property Window, select the Advanced tab at the top of the System Properties dialog. Click Environment Variables button to display Environment Variables Editing the PATH variable, Scroll down inside the System variables box to select the PATH variable. Click the Edith button and the Edit System Variable dialog will appear. Changing the PATH. Place the cursor inside the Variable Value field. Use the left arrow key to move the cursor to the beginning of the list, then type the name of the directory in which the JDK followed by \bin; i.e Add C:\Program Files\Java\jdk1.6.0\bin; to the PATH variable WITHOUT spaces if you choose the default installation directory. Click OK button to apply the changes to the PATH variable. Note: if the path variable is not set properly when you use the JDKs tool or try to compile , an error message like java is not recognized as internal or external command, operable program or batch file will appear of which the whole steps will have to be rechecked again.

2.6 Setting the CLASSPATH Environment Variable In an attempt to run a program and an error message like Exception in thread main java.lang.NoClassDefFoundError: YourClass then the system has a CLASSPATH environment variable that must be modified. To fix this kind of error, follow the steps in the PATH environment variable, to locate the CLASSPATH variable, then edit the variables value to include .; at the beginning of its value(with no spaces before or after these characters).

2.7 Compiling and Executing Java Program


2.7.1 Compiling the Program

A program has to be converted to a form the Java VM can understand so any computer with a Java VM can interpret and run the program. Compiling a Java program means taking the programmer -readable text coded say in notepad called source code and converting it to bytecodes, which are platformindependent instructions for the Java VM.
The Java compiler is invoked at the command line on Unix and DOS shell operating systems as follows: javac ExampleProgram.java

2.7.2 Interpreting and Running the Program Once the program successfully compiles into Java bytecodes, it can be interpreted and run on applications on any Java VM, or interpret and run applets in any Web browser with a Java VM built in such as Netscape or Internet Explorer. Interpreting and running a Java program means invoking the Java VM byte code interpreter, which converts the Java byte codes to platform-dependent machine codes so your computer can understand and run the program. The Java interpreter is invoked at the command line on Unix and DOS sh ell operating systems as follows: java ExampleProgram

2.8 Java Class Library


The Java Class Library is a set of dynamically loadable libraries that Java applications can call at run time. Because the Java Platform is not dependent on any specific operating system, applications cannot rely on any of the existing libraries.
6

Instead, the Java Platform provides a comprehensive set of standard class libraries, containing much of the same reusable functions commonly found in modern operating systems. The Java class libraries serve three purposes within the Java Platform:


They provide the programmer a well-known set of useful facilities, such as container classes and regular expressions. The class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily dependent on the native capabilities of the platform. Finally, some underlying platforms may not support all of the features a Java application expects. In these cases, the class libraries can either emulate those features using whatever is available, or provide a consistent way to check for the presence of a specific feature.

2.9 Java API Packages 2.9.1 What is Java API: Java API is not but a set of classes and interfaces that comes with the JDK. Java API is actually a huge collection of library routines that performs basic programming tasks such as looping, displaying GUI form etc. In the Java API classes and interfaces are packaged in packages. All these classes are written in Java programming language and runs on the JVM. Java classes are platform independent but JVM is not platform independent. The Java comprises three components :
y y y

Java Language JVM or Java Virtual Machine and The Java API (Java programming interface)

The Java language defines easy to learn syntax and semantics for Java programming language. Every programmer must understand these syntax and semantics to write program in Java language.  Type of Java API There are three types of API available in Java Technology.  Official Java Core API The official core API is part of JDK download. The three editions of the Java programming language are Java SE, Java ME and Java EE.
7

 Optional Java API The optional Java API can be downloaded separately. The specification of the API is defined according to the JSR request.  Unofficial APIs These API's are developed by third parties and can downloaded from the owner website.

2.9.2 Official Java Core API list


Name Abstract Window Toolkit Swing Accessibility Drag n Drop Acronym Package(s) that contain the API java.awt javax.swing javax.accessibility java.awt.datatransfer java.awt.dnd javax.imageio javax.imageio.* javax.sound.midi javax.sound.midi.spi javax.sound.sampled javax.sound.sampled.spi JDBC java.sql javax.sql javax.crypto javax.crypto.interfaces javax.crypto.spec Included as part of J2SE 1.4 and later. Available as an optional package to versions 1.2 and 1.3. Description and Version History

AWT

First released with version 1.0. Included in J2SE 1.2 and later.

Image I/O

Sound

Java Database Connectivity Java Cryptography Extension

JCE

Java Authentication and Authorization Service Java Secure


Socket Extension

JAAS

javax.security.auth

Included in J2SE 1.4 and later, previously released as an optional package with version 1.3.

JSSE

javax.net javax.net.ssl java.security.cert

A set of packages that enable secure Internet communications. Included as part of J2SE 1.4 and later, JSSE 1.0.3 is an optional package to the Java 2 SDK, versions 1.2 and 1.3. Allows Java code running in the Java virtual machine (JVM) to call and be called[1] by native applications (programs specific to a hardware and operating system platform) and libraries written in other languages, such as C, C++ and assembly.

Java Native Interface

JNI

2.9.3 Optional Java API list


Name Java Advanced Imaging Java Communications API Java Data Objects Acronym Description and Version History An API which provides a set of interfaces that support a high-level programming model allowing to manipulate images easily.

JAI

JCA JDO A specification of Java object persistence . A full-featured, extensible help system that enables you to incorporate online help in applets, components, applications, operating systems, and devices. A technology that supplies tools for managing and monitoring applications , system objects, devices (e.g. printers ) and service oriented networks. An API that enables audio, video and other time-based media to be added to Java applications and applets. An API for directory services. This API allows for speech synthesis A scene graph -based 3D API. A wrapper library for OpenGL.

JavaHelp

Java Management Extensions

JMX

Java Media Framework

JMF

Java Naming and Directory Interface Java Speech API Java 3D Java OpenGL

JNDI JSAPI J3D JOGL

CHAPTER THREE 3.1 CONTROL STATEMENTS There are different types of control statements: the decision making statements (if-then, if-then-else and switch), looping statements (while, do-while and for) and branching statements (break, continue and return). The control statement is used to control the flow of execution of the program. This execution order depends on the supplied data values and the conditional logic. Java contains the following types of control statements:  Selection Statements  Repetition Statement  Branching Statement 3.1.1 Selection statements:

If Statement: This control statement is used to execute a single statement or a block of code, when the given condition is true and if it is false then it skips if block and rest code of program is executed.
Syntax: if(conditional_expression){ <statements>; ...; ...; }

Program Example int n = 10; if(n%2 = = 0){ System.out.println("This is even number");

If-else Statement: The "if-else" statement t provides another option when 'if' statement evaluates to "false" i.e. else block is executed if "if" statement is false.
Syntax: if(conditional_expression){ <statements>; ...; ...; } else{ <statements>; ....; ....; } Program Example int n = 11; if(n%2 = = 0){ System.out.println("This is even number"); } else{ System.out.println("Not an even number"); }

10

Switch Statement: The keyword "switch" is followed by an expression that should evaluates to byte, short, char or int primitive data types, only. In a switch block there can be one or more labeled cases. The expression that creates labels for the case must be unique. The switch expression is matched with each case label. Only the matched case is executed, if no case matches then the default statement (if present) is executed.
Syntax: switch(control_expression){ case expression 1: <statement>; case expression 2: <statement>; ... ... case expression n: <statement>; default: <statement>; }//end switch
Program Example int day = 5; switch (day) { case 1: System.out.println("Monday"); break; case 2: System.out.println("Tuesday"); break; case 3: System.out.println("Wednesday"); break; case 4: System.out.println("Thrusday"); break; case 5: System.out.println("Friday"); break; case 6: System.out.println("Saturday"); break; case 7: System.out.println("Sunday"); break; default: System.out.println("Invalid entry");

break; }

3.1.2 Repetition Statements: while loop statements: This is a looping or repeating statement. It executes a block of code or statements till the given condition are true. The expression must be evaluated to a boolean value. It continues testing the condition and executes the block of code. When the expression results to false control comes out of loop. Syntax: while(expression){ <statement>; ...; ...; }
11 Program Example int i = 1; //print 1 to 10 while (i <= 10){ System.out.println("Num " + i); i++; }

do-while loop statements: This is another looping statement that tests the given condition past so you can say that the do-while looping statement is a past-test loop statement. First the do block statements are executed then the condition given in while statement is checked. So in this case, even the condition is false in the first attempt, do block of code is executed at least once.
Syntax: do{ <statement>; ...; ...; }while (expression); Program Example int i = 1; do{ System.out.println("Num: " + i); i++; }while(i <= 10);

for loop statements: This is also a loop statement that provides a compact way to iterate over a range of values. From a user point of view, this is reliable because it executes the statements within this block repeatedly till the specified condition is true.
Syntax: for (initialization; condition; increment or decrement){ <statement>; ...; ...; } }

Program Example for (int num = 1; num <= 10; num++){ System.out.println("Num: " + num);

where initialization: The loop is started with the value specified. condition: It evaluates to either 'true' or 'false'. If it is false then the loop is terminated. increment or decrement: After each iteration, value increments or decrements. 3.1.3 Branching Statements: Break statements: The break statement is a branching statement that contains two forms: labeled and unlabeled. The break statement is used for breaking the execution of a loop (while, do-while and for). It also terminates the switch statements.
12

Syntax: break; // breaks the innermost //loop or switch statement. break label; // breaks the outermost //loop in a series of //nested loops.

Program Example int num[ ] = { 2,9,1,4,25,50}; int search = 4; for ( int i = 1; i<num.length; i++){ if (num [i] == search){ System.out.println(data is found) break; } }

Continue statements: This is a branching statement that is used in the looping statements (while, do -while and for) to skip the current iteration of the loop and resume the next iteration .
Syntax: continue; Program Example int num[ ] = { 2,9,1,4,25,50}; int search = 4; for ( int i = 1; i<num.length; i++){ if (num [i] != search){ continue; } if (num [i] == search){ System.out.println(data is found) break; } }

Return statements: It is a special branching statement that transfers the control to the caller of the method. This statement is used to return a value to the caller method and terminates execution of method. This has two forms: one that returns a value and the other that cannot return. The returned value type must match the return type of method.
Syntax: return; return values; } static String Welcome(){ return Welcome to the University of Nigeria; } 13 Program Example public static void Hello(){ System.out.println(Hello! + Welcome() );

return; //This returns nothing and can be used when method is declared with void return type. return expression; //It returns the value evaluated from the expression.

3.2 Array Array is the most important thing in any programming language. By definition, array is the static memory allocation. It allocates the memory for the same data type in sequence. It contains multiple values of same types. It also store the values in memory at the fixed size. Multiple types of arrays are used in any programming language such as: one - dimensional, two - dimensional or multi - dimensional. 3.2.1 Declaration of an array: Array can be declared in the following form int num[]; or int num = new int[2]; Sometimes one can decide to declares an array and it's size simultaneously such as: int num[] = {50,20,45,82,25,63};

3.3 Exception Handling Exceptions are such anomalous conditions (or typically an event) which changes the normal flow of execution of a program. Exceptions are used for signaling erroneous (exceptional) conditions which occur during the run time processing. Exceptions may occur in any programming language. Occurrence of any kind of exception in java applications may result in an abrupt termination of the JVM or simply the JVM crash es which leaves the user unaware of the causes of such anomalous conditions. However Java provides mechanisms to handle such situations through its superb exception handling mechanism. The Java programming language uses Exception classes to handle such erroneous conditions and exceptional events. 3.3.1 Exception Object In java, when any kind of abnormal conditions occurs within a method then the exceptions are thrown in form of Exception Object i.e. the normal program control flow is stopped and an exception object is created to handle that exceptional condition. The method creates an object and hands it over to the runtime system. Basically, all the information about the error or any unusual condition is stored in this
14

type of object in the form of a stack. This object created is called an exception object the process is termed as throwing an exception. The mechanism of handling an exception is called catching an exception or handling an Exception or simply Exception handling. Point to remember here is that exceptions are not errors rather they are some abnormal conditions that aren't necessarily errors. Therefore, the process of detecting the exceptions and responding to them as well is known as Exception handling. 3.3.2 Below are the advantages of Exception-handling in Java:


Exception provides the means to separate the details of what to do when something out of the ordinary happens from the main logic of a program. One of the significance of this mechanism is that it throws an exception whenever a calling method encounters an error providing that the calling method takes care of that error. With the help of this mechanism the working code and the error-handling code can be disintegrated. It also gives us the scope of organizing and differentiating between different errors types using a separate block of codes. This is done with the help of try-catch blocks.

3.3.3 Sample Code The basic syntax to handle an Exception looks like this:
String myException() { try { return myMethod(); } catch ( IOException e ) { return null; } }

15

3.3.4 There are three types of Exceptions:

a.

Checked Exceptions - These are the exceptions which occur during the

compile time of the program. The compiler checks at the compile time whether the program contains handlers for checked exceptions or not. These exceptions do not extend RuntimeException class and must be handled to avoid a compile-time error by the programmer. These exceptions extend the java.lang.Exception class. These exceptional conditions should be anticipated and recovered by an application. Furthermore Checked exceptions are required to be caught. Here is the list of checked exceptions:
NoSuchFieldException InstantiationException IllegalAccessException ClassNotFoundException NoSuchMethodException CloneNotSupportedException InterruptedException

b.

Unchecked Exceptions - Unchecked exceptions are the exceptions which

occur during the runtime of the program. Unchecked exceptions are internal to the application and extend the java.lang.RuntimeException that is inherited from java.lang.Exception class. These exceptions cannot be anticipated and recovered like programming bugs, such as logic errors or improper use of an API. These types of exceptions are also called Runtime exceptions that are usually caused by data errors, like arithmetic overflow, divide by zero etc.

16

Here is the list of unchecked exceptions.


IndexOutOfBoundsException ArrayIndexOutOfBoundsException ClassCastException ArithmeticException NullPointerException IllegalStateException SecurityException

c. Error - The errors in java are external to the application. These are the exceptional conditions that could not be usually anticipated by the application and also could not be recovered from. Error exceptions belong to Error and its subclasses are not subject to the catch or Specify requirement. Suppose a file is successfully opened by an application for input but due to some system malfunction could not be able to read that file then the java.io.IOError would be thrown. This error will cause the program to terminate but if an application wants then the error might be caught. An Error indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions. 3.3.5 Handling Multiple Catch Clauses In java when we handle the exceptions then we can have multiple catch blocks for a particular try block to handle many different kind of exceptions that may be generated while running the program i.e. one can use more than one catch clause in a single try block. However every catch block can handle only one type of exception. This mechanism is necessary when the try block has statement that raises different type of exceptions. The syntax for using this clause is given below: try{ ??? ??? } catch(<exceptionclass_1> <obj1>){ //statements to handle the exception } catch(<exceptionclass_2> <obj2>){ //statements to handle the exception } catch(<exceptionclass_N> <objN>){ //statements to handle the exception } 17

When an exception is thrown, normal execution is suspended. The runtime system proceeds to find a matching catch block that can handle the exception. If no handler is found, then the exception is dealt with by the default exception handler at the top level.

18

CHAPTER FOUR Sample Programs And Outputs Sample Code 1: import java.util.*; public class sort{ public static void main(String[] args){ int num[] = {4011,5612,3330,3408,4078,3669}; int l = num.length; int i; System.out.print("Given number : "); for (i = 0;i < l;i++ ){ System.out.print(" " + num[i]); } System.out.println("\n"); System.out.print("Ascending order number : "); Arrays.sort(num); for(i = 0;i < l;i++){ System.out.print(" " + num[i]); } } }

19

Sample Code 2: import java.util.*; import java.io.*; public class ShufflingListAndArray{ public static void main(String[] args) throws IOException{ BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); System.out.print("How many elements do you want to add to the list: "); int n = Integer.parseInt(in.readLine()); System.out.print("Enter" + n + "numbers to sort: "); List<Integer> list = new ArrayList<Integer>(); for (int i = 0; i < n; i++){ list.add(Integer.parseInt(in.readLine())); } Collections.sort(list); System.out.println("List Sorted in Ascending Order :" + list); Collections.shuffle(list); //Collections.sort(list); System.out.println("List Shuffled :" + list); } }

20

Sample Code 3: import java.util.Arrays; import java.util.Collections; import java.util.List; public class ArrayShuffle{ public static void main(String[] args){ // Initialises the content of the array String[] alphabets = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", Z"}; //As the collections.shuffle method need a list for the parameter, we convert the array //into a list using the arrays class List<String> list = Arrays.asList(alphabets); //Here we simply used the shuffle method of Collections class to shuffle our defined //array Collections.shuffle(list); System.out.print(alpha + " "); } } }

21

Sample Code 4: import javax.swing.JOptionPane; public class dialogue1 { public static void main(String args[]) { JOptionPane.showMessageDialog( null, "Welcome\nto\nThe University of Nigeria, Nsukka"); } }

22

CONCLUSION The SIWES programme undergone at the Information Technology Unit of AfroB Bank International Plc afforded me an in-depth exposure to some of the practical industrial aspects of programming. I was opportune to have known and lay my hands (viewing) on some of their applications source codes even though there are strict restrictions due to security reasons like hacking and cloning of software. Worthy of note is that the programme has been highly enlightening, beneficial, interesting and successful. The objective of which the scheme was undergone was however achieved a great deal. RECOMMENDATION Although SIWES as scheme that every student of a University must participate in at a certain level, quite a lot of its stated objectives is being archieved. Nevertheless, the following recommendations are suggested to improve on the qualitative of the programme:  Participation of private corporate organization to minimize the problem of low funding.  Participation of various professional, regulatory and statutory bodies in the supervision of students in line with their various course of study.  Posting of students specifically to establishments where the stipulated aims and objectives of SIWES would be achieved.  Payment of students good allowances to assist in their upkeep during the period of training.

23

REFERENCES  Introduction to Programming Using Java (Version 6.0, June 2011) by David J. Eck  Java How to Program 7 by Paul Dietel & Harvey Dietel  Java programming from the beginning by K. N. King

24

S-ar putea să vă placă și