Software Development Practise 2020 - Topics Monday - Tuesday - Wednesday: 11am to 2pm short breaks: 11:30 - 12:00 - 12.30 ... Online english documents: http://skripta.de/java1e ============================================= Monday May 11th: Java basic features: Difference between Compiler based languages and Framework languages => executable vs. Compiler classcode Platform independence => Java Runtime necessary For Application development: Java Compiler (javac) + Interpreter (java) = SDK / JDK Integrated Development Environment (IDE) eg. Eclipse / Netbeans For Execution only: JRE Java Runtime Environment ===================================================== Tuesday May 12th: Internal Memory structure (binary form): Data <-> Commands (von-Neumann-principle) Higher programming languages Development of programming principles: Web-Apps <-> Local (Standalone)-Application Application <-> App Elementary Datatypes: Variable vs. Constant Data types Numeric / Character / Boolean String (Object datatypes) type-casting Errors / Mistakes: Restricted memory-value-range of minor numeric data types ================================================================================== Operators: Arithmetic, Relational, Logical, Increment Errors / Mistakes: Division of integral values Division by zero OR-Operation (right side expression not evaluated) Prefix/Postfix Inkrement or Decrement Operation ( ++a, a++) Program control structures: Loops ( while, do-while, for ) Alternatives (if - else, switch - case) Errors: endless loops, switch break, =================================================== Objects: Objects / Classes : Difference / Data + Methods Objectcomponents: Attributes / methods / minimum # = 0 Constructor: Arguments / Return value / "this" Object-reference (Stack) <-> object-data (Heap) SCOPE of Objects - Visibility / Lifetime Garbage Collection / finalize() Access modifiers - private vs. public ====================================================== Objects (cont'd): Attributes, Object Datatypes vs. Local Datatypes Naming conflicts possible Object-Datatype String, Methods ... Object data reside in Data segment / Heap Object methods reside in Code Segment Importance of certain operations (=, ==) on References, eg. Nulling references or assigning new values Counting the number of existing Objects by STATIC (increase by constructor, decrease by finalize) ====================================================== Class - Relations: a) Association: One2One, One2Many ... No keyword, has to be done by coding Multiple possibilities: 1:1, 1:* ... Containertypes: Array, LinkedList "Inner class" - implementation and importance Difference to SQL-Databases: no Primary key / Foreign key instead using objectreferences Bi-directional association ====================================================== b) Inheritance Creation Process of Objects in an Inheritance hierarchy Constructors and their sequence Access modifiers (private, public, protected) Method overwriting Virtual methods, abstract methods, abstract classes ClassModel (UML, self defined, BlueJ ) ======================================================= Object Persistence: Identity of Objects (LValue - RValue) Typeconversion Up- / Downcast / problems arising in downcast Typechecking ( instance of ) Storing Objects in application: Container types: Arrays / Vector Static Arrays, dynamic Vector / Arraylist Storing Objects in external memory / external Storage / Serialization into filesystem / network Object relational mapping ========================================================== Database Connectivity: JDBC-ODBC, proprietary drivers How to establish a DB-Connection Java commands, Import java.sql.* Example JAVA-JDBC-MySQL Modularisation of Java Components (classes) Object-Rational Mapping Object Identity (Memory address <-> Primary Key) SQL-commands revisited INSERT, SELECT, UPDATE, DELETE