CSS 3Q

Cards (33)

  • Computer Program
    A set of instructions that you write to tell a computer what to do
  • Application Software
    A program that performs a task for a user (such as calculating and producing paychecks, word processing, or playing a game)
  • System Software
    A program that manages the computer itself (eg. Windows, Linux)
  • All computer programs ultimately are converted to machine language
  • Machine Language/Machine Code
    The most basic set of instructions that a computer can execute
  • Low-level programming language
    Written to correspond closely to a computer processor's circuitry
  • High-level programming language
    Allows you to use English-like vocabulary to write programs
  • Types of Programming Languages
    • Low-Level Language - Binary Code Machine Language
    • Medium-Level-Language - Assembly Language & C, C++
    • High-Level-Language - Cobol, Pascal, Python & Java
  • Syntax
    The rules that define the ways language elements are used together correctly to create usable statements
  • Compiler
    Translates an entire program at once before any part of the program can execute
  • Interpreter
    Translates one statement at a time, allowing a program to execute partially
  • Java
    A high-level programming language originally developed by SUN MICROSYSTEM & RELEASED IN 1995
  • Java
    • Architecturally neutral - you can write programs that run on any platforms such as WINDOWS, MAC OS and various version of UNIX
    • Java Virtual Machine (JVM) is a hypothetical (software based) computer on which Java runs
    • The latest release of the Edition is Java SE 19. With the advancement of Java and its widespread popularity, multiple configurations were built to suit various types of platform
  • Java
    • Object Oriented - In Java, everything is an Object. Java can be easily extended since it is based on the Object model
    • Platform Independent - Unlike many other programming languages including C and C++, when JAVA is compiled, it is not compiled into a platform specific machine, rather into platform independent byte code. This byte code is distributed over the web and interpreted by the Virtual Machine (JVM) on which platform it is being run on
    • Simple - Java is designed to be easy to learn
    • Secure - With Java's secure feature it enables to develop virus-free, tamper-free systems. Authentication techniques are based on public-key encryption
    • Architecture-neutral - Java compiler generates an architecture-neutral object file format, which makes the compiled code executable on many processors, with the presence of Java runtime system
    • Multithreaded - With Java's multithreaded feature it is possible to wire programs that can perform many tasks simultaneously. This design feature allows the developers to construct interactive applications that can run smoothly
    • Interpreted - Java byte code is translated on the fly to native machine instructions and is not stored anywhere. The development process is more rapid and analytical since the linking is an incremental and light-weight process
    • High Performance - with the use of just-in Time compilers, Java enables high performance
    • Distributed - Java is designed for the distributed environment of the internet
    • Dynamic - Java is considered to be more dynamic than C or C++ since it is designed to adapt to an evolving environment. Java programs can carry an extensive amount of run time information that can be used to verify and resolve accesses to objects on run time
  • James Gosling initiated Java language project

    June 1991
  • Sun released the first public implementation as Java 1.0
    1995
  • Sun released much of Java as free and open source software under the terms of the GNU (GENERAL PUBLIC LICENSE )
    13 November, 2006
  • Sun finished the process, making all of Java's core code free and open-source, aside from a small portion of code to which Sun did not hold the copyright
    8 May, 2007
  • Tools you can use
    • Notepad
    • NetBeans
    • Eclipse
  • Installing JDK & Eclipse IDE
    1. STEP 1
    2. STEP 2
    3. STEP 3
  • Installing the Eclipse IDE
    1. STEP 1
    2. STEP 2
    3. STEP 3
    4. STEP 4
    5. STEP 5
    6. STEP 6
    7. STEP 7
    8. STEP 8
  • Creating New Java Project
    1. PROJECT NAME: YOUR LAST NAME
    2. SRC
    3. PACKAGE NAME: ICT2
    4. CLASS NAME: PT1 OR QUIZ1
  • Basic Syntax
    • Case Sensitivity - Java is case sensitive
    • Class Names - For all class names the first letter should be in Upper Case. If several words are used to form a name of the class, each inner word's first letter should be in Upper Case
    • Method Names - All method names should start with a Lower Case letter. If several words are used to form the name of the method, then each inner word's first letter should be in Upper Case
    • Program File Name - Name of the program file should exactly match the class name
    • public static void main(String args[]) - Java program processing starts from the main() method which is a mandatory part of every Java Program
  • Java Identifiers

    Names used for classes, variables, and methods
  • Random
    An instance of java Random class is used to generate random numbers
  • Scanner
    Used to get user input
  • Operands
    Values involved in an operation
  • Relational Operators

    • Equal to(==)
    • Not Equal to (!=)
    • >(Greater than)
    • >=( Greater than equal to)
    • <(less than)
    • <=(less than equal to)
  • If Statement
    Used to check a condition and execute code based on the result
  • If Else
    Executes one block of code if the condition is true, and another block if the condition is false
  • If Else If
    Checks multiple conditions and executes the corresponding block of code
  • Fix the syntax errors in the provided code
  • String Methods
    Methods that can be used to manipulate strings