ObjectOriented Design and Software Applications You will learn

Object-Oriented Design and Software Applications

You will learn to use… Java programming to develop software applications. Eclipse Integrated Development Environment (IDE).

Introduction to Java Programming Sun Microsystems targeted consumer electronic devices and in 1991 initiated a research project which produced a language for this purpose, “Oak”, a C++ based language In 1995, the language was redesigned for internet applications Java programs can be embedded in HTML pages as Java Applets Java programs are not limited to web applications.

Objective of Java Programming Object Oriented - properties and behaviors Java is Distributed – programs can run on computer networks. Java is Interpreted – Java programs are interpreted in web browsers

Objectives of Java Programming Java is Robust – Handles runtime errors and ends program gracefully. Java is Secure – Running JAVA Applet will not destroy your system Java Performance – Slow compared to C++. But OK for most interactive applications Java is Multithreaded – Can perform several tasks e. g. , downloading music and playing it simultaneously.

Java Environment Five phases required for a Java program Phase I - Edit Eclipse will be our editor Java program files end with. java extension Phase II - Compiler translates source code into bytecode Bytecode is interpreted during the execution phase Compiled file ends with. class extension

Java Environment Phase III - Load Class loader placed the. class file into main memory May be loaded from a local disk or across a network Phase IV - Verify Bytecode verifier ensures that classes are valid and don’t violate security restrictions of Java Phase V – Execute Interpretes one bytecode at a time Interpreter is also called the Java Virtual Machine (JVM) Same process for applications and applets Each browser that supports Java has a built-in JVM

Software Development Method 1. 2. 3. Specify the problem Analyze the problem Design the classes to solve the problem by: a. b. c. 4. 5. 6. Locating relevant classes in existing libraries Modifying existing classes where necessary Designing new classes where necessary Implement the new and modified classes Test and verify the completed program Maintain and update the program

Algorithm A sequence of precise instructions which leads to a solution Algorithm to add two numbers 1. Define two variables to hold the numbers. 2. Ask user to enter two numbers. 3. Add numbers together for answer. 4. Display the answer to the user.

Time for First Program
- Slides: 10