Introduction to Java August 14, 2008 Mrs. C. Furman Java Developed by James Gosling at SUN Microsystems, initially as a tool to address problems other languages didn’t handle well. Introduced in 1995 Object-Oriented Language Compilers & Interpreters Java compiler translates source code into bytecode – a representation of the program in a low-level form, similar to machine language Java interpreter reads Java bytecode and executes it on a specific machine. Another compiler could translate the bytecode into a particular machine language for efficient execution Java is not tied to a particular processor type. It is “Architectual Neutral” and easily portable from one machine to another, over different OS. Software Engineering Computer Programming – refers to the process of software development. We build a program in stages. Software Engineering – the application of systematic and disciplined approach to development, testing and maintenance of a program Software Life Cycle 1. 2. Analysis – feasibility study. Analyze the problem to determine whether a solution is possible. The result of this phase is a requirements specification, that describes the features of the program Design – turn requirements specification into a detailed design of the program. The result of this phase is a set of classes/objects that fulfill the requirements. Software Life Cycle Cont… 3. 4. Coding – implementing the design into an actual program. This should be the shortest part of the cycle if our design is well done. Testing – running the program using different sets of data to verify that the program runs according to specifications. Two types of testing. Unit Testing – test each class individually. Integration Testing – test that each class works together. Software Life Cycle Cont… 4B. Debugging – Eliminates any program errors. An error could be a result of faulty implementation or design. 5. Operation – the program is actually used. The most important and time-consuming activity during the operation phase is software maintenance. We often need to change and add features for customers, or fix previously undetected errors. It is estimated that 70% of the cost of software is related to maintenance.