.. _module1: ************************************************************************************************************************ Module 1 | Java Introduction, Static and main methods, Exceptions, Arrays, Dev Tools, Pre-post conditions ************************************************************************************************************************ Objective ========= By the end of this module, students will be able to: * Write simple Java programs involving objects, primitive types and arrays * Understand the difference between static and non-static fields and methods * Understand object references the consequence of the by value parameter passing * Be able to program with exceptions * Be able to document correctly Java programs * Use the IntelliJ IDE Resources ======================================= Slides (keynote) * `Lecture 1 Videos `_ * `Lecture 1 Slides `_ * `Youtube Live `_ Q&A Session 2020-2021 * `Restructuration `_ Q&A Session 2021-2022 * `Lecture 2 Videos `_ * `Lecture 2 Slides `_ * `Youtube Live `_ Q&A Session * `W3schools Tutorial on Java `_ Exercises: week 1 ======================================= 1. `Intro to Java `_ 2. `Exceptions `_ 3. `Write code that generates exceptions `_ 4. `CommonElements `_ 5. `Convolution `_ 6. `1D and 2D arrays `_ Exercise 1.1.1 """""""""""""" * Write a java program "Calculator" that takes a series of int argument from the command line, make the summation and prints the result. Hint `parseInt `_ method may be useful. * Compile your program using javac (verify that the file ``Calculator.class`` has been generated) * Execute your program from the command line and verifies that it works: ``java Calculator 10 2 13`` should output 25 * Now edit your program in IntelliJ and pass the arguments from IntelliJ Exercises: week 2 ======================================= 1. `Common errors `_ 2. `Value vs References `_ 3. `String `_ 4. `ASCIIDecoder `_ 5. `Anagram `_ 6. `Casting `_ 7. `Access Modifiers `_ 8. `Sorting with Comparator and Collections `_ 9. `Sieve of Eratostheme MCQ `_ 10. `Sieve of Eratostheme Implem `_