Module 1: Overview of Computer Program, Programming
Process, and Operators
Lesson 1: Computer Programs, Algorithms, and
Flowcharting
     Computer Components are categorized into two: - Hardware:
      Tangible components like the monitor, keyboard, mouse. - Software:
      Programs that help the computer function, stored on hardware (e.g.,
      hard disk).
Programming
     Described as a ubiquitous element, enabling various daily tasks.
     Modern tech companies are more than software companies, affecting
      everything from food delivery to elections.
Hardware Components
     CPU and Memory are crucial for the computer to function. - Memory
      is divided into: - Main Memory: Volatile and directly accessible. -
      Secondary Memory: Non-volatile and stores data for the long term.
Input and Output Devices
     These allow the computer to interact with the external world by
      moving data in and out.
Software
     Defined as programs that computers use to function. Stored on
      hardware like a hard disk.
Programs
     Instructions for the processor.
Types of Computer Programs:
  1. System Programs: Manage system resources.
  2. Application Programs: Software for end-users.
  3. Compilers: Translate code into machine language.
Programming Languages
     High-Level Languages: - User-friendly, platform-independent, and
      abstract from hardware details.
     Low-Level Languages: - Closer to machine code, platform-
      dependent, and efficient but harder to program.
The Program Development Life Cycle
  1. Problem Definition: Clearly defining the problem to be solved.
  2. Problem Analysis: Breaking the problem into smaller components.       -
     Identifying inputs (starting data) and outputs (desired result).
  3. Algorithm Design and Representation: Creating a step-by-step
     solution. - Algorithms can be expressed in plain language, flowcharts,
     or pseudocode.
  4. Coding and Debugging: Writing source code based on the designed
     algorithm.
Flowcharting
     A graphical way to represent the sequence of operations in an
      information system or program.
     Common symbols used in flowcharting: - Terminal Symbol:
      Represents the start or end. - Input/Output Symbol: Indicates data
      entry or display. - Process Symbol: Shows a process step. -
      Flowline Symbol: Depicts the flow of the sequence. - Decision
      Symbol: Represents a decision point. - Connector Symbol: Used to
      connect different parts of the flowchart.
Types of Errors
  1. Compile-Time Errors (Syntax Errors): Occur when there is a
     mistake in the code's syntax.
  2. Runtime Errors: Errors that occur during the execution of the
     program, often due to logic errors like infinite loops.
The document titled "IT 112 Module 1 Lesson 2" focuses on Java
Programming and covers various topics including its history, uses, and
components.
      Learning Outcomes
     Discuss the history and components of Java.
     Differentiate between Java platforms.
     Discuss the structure of a Java program.
      History of Java
     Created in 1991 by James Gosling, Mike Sheridan, and Patrick
      Naughton at Sun Microsystems.
     Initially called Oak, later renamed Java.
     The first project developed using Java was a personal hand-held
      remote control called Star7.
     Recognized as an ideal tool for Internet programming due to the
      growth of the Web and Internet.
      Uses of Java
     Android app development.
     Enterprise software creation.
     Mobile applications.
     Scientific computing.
     Big Data analytics.
     Programming hardware devices.
     Server-side technologies like Apache, JBoss, GlassFish.
      Java Versions and Release Dates
     Java SE 17 (Sept 14, 2021)
     Java SE 18 (Mar 22, 2022)
     Java SE 19 (Sept 20, 2022)
   Java SE 20 (Mar 21, 2023)
   Java SE 21 (Sept 19, 2023) - LTS version
   Java SE 22 (Mar 19, 2024)
    Components of Java Programming Language
   Java Virtual Machine (JVM): Executes Java code by converting
    bytecode into machine language.
   Java Runtime Environment (JRE): Contains class libraries, JVM, and
    supporting files for running Java applications.
   Java Development Kit (JDK): Software development environment
    containing tools like a compiler and debugger.
    Java Platforms
1. Java SE: Standard edition, core functionality of the Java programming
   language.
2. Java EE: Enterprise edition for developing large-scale, scalable, and
   secure network applications.
3. Java ME: Micro edition designed for small devices like mobile phones.
4. JavaFX: Used for developing rich internet applications with lightweight
   UI APIs.
    Phases of a Java Program
1. Compilation: Source code is compiled into bytecode.
2. Execution: Bytecode is interpreted by the JVM.
    Structure of a Java Program
   Package Statement: Organizes code.
   Import Statements: Allows usage of external classes and packages.
   Class Definition: Defines the class.
   Main Method Class: Contains the main method that executes the
    program.
   A Simple Java Program Example:
    public class Hello {
        public static void main(String[] args) {
            System.out.println("Hello Java");
   public class: Defines a class.
   main() method: Entry point of the program.
   System.out.println: Prints output to the screen.
    Java Identifiers and Keywords
   Identifiers must start with a letter, underscore, or dollar sign.
   Keywords (e.g., public, void, class) are reserved and cannot be used as
    identifiers.
    Java Escape Characters
   Examples: \n (new line), \t (tab), \\ (backslash).
    Integrated Development Environment (IDE)
   NetBeans IDE: Popular Java IDE that simplifies coding, debugging,
    and running Java programs.
    Writing Your First Java Program Using NetBeans
   Create a new Java project and class and write a basic "Hello World"
    program in Java.
    Conclusion
    The lesson gives a comprehensive overview of Java's history, key
    components (JVM, JRE, JDK), platforms (SE, EE, ME, FX), and basic
    program structure. It also introduces NetBeans as a development tool
    for coding in Java.