Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.

Slides:



Advertisements
Similar presentations
 2005 Pearson Education, Inc. All rights reserved Introduction.
Advertisements

How do we make our Welcome.java program do something? The java in our Welcome.java file won’t do anything by itself. We need to tell the computer to execute.
CHAPTER 1 INTRODUCTION GOALS  To understand the activity of programming  To learn about the architecture of computers  To learn about machine code and.
Introduction to Java Programming, 4E
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
Programming Languages Structure
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
Lecture 2: Do you speak Java?. From Problem to Program Last Lecture we looked at modeling with objects! Steps to solving a business problem –Investigate.
Introduction to Java.
1. 2 Chapter 1 Introduction to Computers, Programs, and Java.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
Sadegh Aliakbary Sharif University of Technology Fall 2011.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
+ Java vs. Javascript Jessi Style. + Java Compiled Can stand on its own Written once, run anywhere Two-stage debugging Java is an Object Oriented Programming.
S.W. Ma/CIM/LWL41211/2 Prog. IIA Page 1 HKIVE (Lee Wai Lee Campus) Department of CIM Course : Year 2 Module : Programming IIA Textbook : Introduction.
Advanced Java New York University School of Continuing and Professional Studies.
(C) 2010 Pearson Education, Inc. All rights reserved.  Java programs normally go through five phases  edit  compile  load  verify  execute.
Basics Programming Concepts. Basics A computer program is a set of instructions to tell a computer what to do Machine language = circuit level language.
Sadegh Aliakbary Sharif University of Technology Fall 2010.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
Chapter 1 Introduction to Java 10/8/2015 Lecture 1 1.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
Computer Programming A program is a set of instructions a computer follows in order to perform a task. solve a problem Collectively, these instructions.
FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
Chapter 1: Introduction to Programs, and Java 1. Objectives To review programs (§ ). To understand the relationship between Java and the World Wide.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Programs.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
Introduction to Java Programming with Forte Y. Daniel Liang.
Java Programming Presented by Daniel Rosenthal Friday, November 30 th, 2007.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
Lecture 1. Introduction to Programming and Java MIT- AITI 2003.
Application Architecture Using Java Hong Li. Introduction Developed by a team led by James Gosling at Sun Microsystem. Originally called Oak, designed.
Introduction Mehdi Einali Advanced Programming in Java 1.
Introduction to Java Programming. 2 Chapter 1 Introduction to Java and Forte F What Is Java? F Getting Started With Java Programming –Create, Compile.
CHAPTER 1 INTRODUCTION. CHAPTER GOALS To understand the activity of programming To learn about the architecture of computers To learn about machine code.
©2016 Pearson Education, Inc. Upper Saddle River, NJ. All Rights Reserved. CSC 110 – INTRO TO COMPUTING - PROGRAMMING Overview of Programming.
Alexandria University Faculty of Science Computer Science Department Introduction to Programming C++
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
Java Programming Fifth Edition Chapter 1 Creating Your First Java Classes.
Introduction to Java Programming, 4E Y. Daniel Liang.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
Introduction to Algorithm. What is Algorithm? an algorithm is any well-defined computational procedure that takes some value, or set of values, as input.
Introduction to Object Oriented
Lecture 1b- Introduction
Object-Oriented Programming Using Java
GC101 Introduction to computer and program
Chapter 1 Introduction to Computers, Programs, and Java
Chapter No. : 1 Introduction to Java.
Java programming lecture one
Chapter 1 Introduction to Computers, Programs, and Java
Advanced Programming Fall 2017.
Hands-on Introduction to JAVA
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

Lecture1 Instructor: Amal Hussain ALshardy

Introduce students to the basics of writing software programs including variables, types, arrays, control structures, input/output, and general rules for writing good code. 2

WeekTopic 1-2 Introduction to basic concepts of writing code, compilation, and execution 3Using Classes/Objects/Data members as building blocks 4Defining methods: parameters, return values 5-6 Primitive data types and operations (variables, types, assignment, and expressions) 7-8Control statements 9-11Loops and arrays 12-13Vectors 14Input/output via console 3

1)quizzes (10%) 2)Lap exam (20%) 3)Midterm (30%) 4)Final Exam (40%) 4

-Students will be able to solve problems using programming. -Students will learn to use professional programming coding style and comments to improve code readability and maintainability. -Students will learn to write error-free code using debugging and testing techniques. 5

a. An ability to apply knowledge of mathematics, computing, science, and engineering appropriate to the discipline Students apply knowledge of programming to solve simple programming problems. b. An ability to analyze a problem, and identify and define the computing requirements appropriate to its solution Students acquire the ability to study programming problems and write programs that realize the required logic. c. An ability to design, implement and evaluate a computer-based system, process, component or program to meet desired needs Students are required to write (implement) their assignment in the form of methods to be called from the main method and test their methods by passing different appropriate values. d. An ability to function effectively on teams to accomplish a common goal --- e. An understanding of professional, ethical, legal and social issues and responsibilities Students will understand the importance of code readability and maintainability. i. An ability to use the current techniques, skills, and tools necessary for computing practice. Students use the command line and an IDE for writing, formatting, compiling, running, and debugging code. 6

7

computer programs, known as software, are instructions that tell a computer what to do. : 8

9

1)Machine language: a computer native language_set of built–in primitive instructions, in form of Binary Code. 10

2)Assembly Language: Assembly language uses a short descriptive word to represent each of the machine- language instructions 11 SUB AX,BX …. Assembler Assembler translate assembly language into machine code

:3)High-Level Languages English-like and easy to learn and use, you can write the program and run it, for example: C++, C#, Visual Basic, Java..etc 12

13 Introduction to Java: What Is Java? Getting Started With Java Programming Create, Compile and Running a Java Application

High level programming language :that Developed by James Gosling and Sun Microsystems Developing software running on mobile devices, desktop computers and servers. Oak in 1991 for use in embedded chips in consumer electronic appliances In 1995 named Java and redesigned for developing Web application. 14

-Write a Simple Java Application -Compiling Programs -Executing Applications 15

16 public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java!"); } You save a java program in a.java file And compile it into a.class file. The.class file executed by java virtual machine 1)Program written in the notepad editor

17 Source code Output Note that line number for reference purposes only 2)The program written in the Netbeans IDE’s (Integrated Developmen t Environment

You have to create your program and compile it before it can be executed. This process is repetitive. If your program has compile errors or run time errors you have to modify the program to fix them, and then recompile it, and execute it again. A java compiler translates a java source file into a java bytecode file. The following command compiles Welcome.java: javac Welcome.java If there aren’t any errors, the compiler generate a bytecode file with a.class extension. Thus, the preceding command generates a file named Welcome.class and this file is executed using java command. 18 Write this command in the Command Prompt Javac ClassName.java

19

Java language is high level language, but java bytecode is a law level language. The bytecode is similar to machine instructions but is architecture neutral and can run on any platform that has a java virtual machine(JVM). (JVM): is a program that interprets java bytecode. 20 Welcome.java (java source code file) Welcome.class (java bytecode executable file) Java compiler JVM Library code Compiled byGeneratesExecuted by Java ClassName

java bytecode can be executed in any computer with a Java Virtual Machine. 21 Any computer Any computer JVM Java Bytecode

On command line java classname 22

23

24