Presentation on theme: "Visual and Internet Programming using JAVA"— Presentation transcript:
1 Visual and Internet Programming using JAVA ICT 6007Visual and Internet Programming using JAVAMohammad Tanvir AlamLecturerIICT,BUETHome page:
2 Feel free to e-mail me anytime AdministrativeContactCourse GroupCourse handoutOrPlease join the group to get lecture materials and participate in group discussionFeel free to me anytime
3 Java How to Program (5th or 6th edition) Deitel & Deitel ReferenceBookJava How to Program (5th or 6th edition)Deitel & DeitelProgramming ToolsJava 2 Standard EditionIDEJBuilder 7.0 or laterKawa 4.0 or later
4 Chapter 1OutlineHistory of C++ History of Java Java Class Libraries BASIC, Visual Basic, Visual C++, C# and .NET Basics of a Typical Java EnvironmentThinking about Objects
5 Machine Languages, Assembly Languages and High-Level Languages “Natural language” of computer componentMachine dependentAssembly languageEnglish-like abbreviations represent computer operationsTranslator programs convert to machine languageHigh-level languageAllows for writing more “English-like” instructionsContains commonly used mathematical operations
6 Compiler VS Interpreter Compiler convert to whole program to machine languageInterpreterExecute high-level language programs without compilation line by line
7 History of C++ C++ Objects Evolved from C Provides object-oriented programming capabilitiesObjectsReusable software components that model real-world items
8 History of JavaJavaOriginally for intelligent consumer-electronic devicesThen used for creating Web pages with dynamic contentNow also used for:Develop large-scale enterprise applicationsEnhance WWW server functionalityProvide applications for consumer devices (cell phones, etc.)
9 Java contains class libraries Java Class LibrariesClassesInclude methods that perform tasksUsed to build Java programsJava contains class librariesKnown as Java APIs (Application Programming Interfaces)
10 BASIC, Visual Basic, Visual C++, C# and .NET Beginner’s All-Purpose Symbolic Instruction CodeVisual Basic .NETFramework Class Library (FLC)Visual C++Microsoft Foundation Classes (MFC)C#C-Sharp.NET.NET platform
11 Basics of a Typical Java Environment Java programs normally undergo five phasesEditProgrammer writes program (and stores program on disk)CompileCompiler creates bytecodes from programLoadClass loader stores bytecodes in memoryVerifyVerifier ensures bytecodes do not violate security requirementsExecuteInterpreter translates bytecodes into machine language
12 Fig. 1.1 Typical Java environment. PrimaryMemory.DiskEditorCompilerClass LoaderProgram is created in an editor and stored on disk in a file ending with .java.Compiler creates bytecodes and stores them on disk in a file ending with .class.Class loader reads .class files containing bytecodes from disk and puts those bytecodes in memory.Phase 1Phase 2Phase 3Bytecode VerifierBytecode verifier confirms that all bytecodes are valid and do not violate Java’s security restrictions.Phase 4InterpreterInterpreter reads bytecodes and translates them into a language that the computer can understand, possibly storing data values as the program executes.Phase 5Fig. 1.1 Typical Java environment.
13 Thinking About Objects (cont.) Reusable software components that model real-world itemsLook all around youPeople, animals, plants, cars, etc.AttributesSize, shape, color, weight, etc.BehaviorsBabies cry, crawl, sleep, etc.
14 Thinking About Objects (cont.) Object-oriented design (OOD)Models real-world objectsModels communication among objectsEncapsulates attributes and operations (behaviors)Information hidingCommunication through well-defined interfacesObject-oriented languageProgramming in object oriented languages is called object-oriented programming (OOP)Java