I NTRODUCTION TO P ROGRAMMING ICS 3U 1. W HAT I S A P ROGRAM ? A program is a set of instructions that makes the computer do something. There are two.

Slides:



Advertisements
Similar presentations
What is a Computer Program? For a computer to be able to do anything (multiply, play a song, run a word processor), it must be given the instructions.
Advertisements

In Review JAVA C++ GUIs - Windows Webopedia.com.
MC697 Object-Oriented Programming Using Java. In this class, we will cover: How the class will be structured Difference between object-oriented programming.
Programming Creating programs that run on your PC
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
The Analytical Engine Module 6 Program Translation.
Computers: Tools for an Information Age
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
Course: Introduction to Computers
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Types of software. Sonam Dema..
COMP Computer Basics Yi Hong May 13, 2015.
Advanced OOP MCS-3 OOP BSCS-3 Lecture # 1
Introduction to Programming G50PRO University of Nottingham Unit 1 : Introduction Paul Tennent
I NTRODUCTION TO P ROGRAMMING ICS 3U 1. W HAT I S A P ROGRAM ? A program is a set of instructions that makes the computer do something. There are two.
CSC 142 A 1 CSC 142 Introduction to Java [Reading: chapter 0]
Chapter 1 Coding Introduction.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
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.
Chapter 1.4 Programming languages Homework Due: Monday, August 11, 2014.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Programming Languages Machine.
111 © 2002, Cisco Systems, Inc. All rights reserved.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
Sadegh Aliakbary Sharif University of Technology Fall 2012.
INTRODUCTION TO JAVA AND ANDROID. Slide 2 Our Ecosystem Java Eclipse Android SDK.
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Guide to Programming with Python Chapter One Getting Started: The Game Over Program.
Fall 2006Slides adapted from Java Concepts companion slides1 Introduction Advanced Programming ICOM 4015 Lecture 1 Reading: Java Concepts Chapter 1.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
10/8: Software What is software? –Types of software System software: Operating systems Applications Creating software –Evolution of software development.
CT1513 Introduction To java © A.AlOsaimi.
1 Text Reference: Warford. 2 Computer Architecture: The design of those aspects of a computer which are visible to the programmer. Architecture Organization.
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.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
 Computer Languages Computer Languages  Machine Language Machine Language  Assembly Language Assembly Language  High Level Language High Level Language.
1 Chapter 1 Programming Languages Evolution of Programming Languages To run a Java program: Java instructions need to be translated into an intermediate.
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
Today… “Hello World” ritual. Brief History of Java & How Java Works. Introduction to Java class structure. But first, next slide shows Java is No. 1 programming.
Getting Started With Java September 22, Java Bytecode  Bytecode : is a highly optimized set of instructions designed to be executed by the Java.
Installing Java on a Home machine For Windows Users: Download/Install: Go to downloads html.
INTRODUCTION TO JAVA AND ANDROID. Slide 2 Our Ecosystem Java Eclipse Android SDK.
1 Introduction Read D&D Sec 1.8; Sec 1.13 THE Java tutorial -
Chapter 1: Introduction to Computers and Programming.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 1 Introduction to Computers,
Introduction to JAVA Programming
Introduction to Programming AP Computer Science. Computers What is a computer? –CPU –ALU –Memory –Hard Drive.
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 CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
Chapter 1 Coding Introduction.
Computer System Structures
Software Development Environment
Installing Java on a Home machine
Lecture 1: Introduction to JAVA
Chapter 1 FOUNDATIONS OF JAVA
Installing Java on a Home machine
Chapter 1 Coding Introduction.
Programming Languages
Java History, Editions, Version Features
Presentation transcript:

I NTRODUCTION TO P ROGRAMMING ICS 3U 1

W HAT I S A P ROGRAM ? A program is a set of instructions that makes the computer do something. There are two ways to supply a program to a computer: 1) Buy a program written by somebody else (Future Shop, Google Play Store, etc.). 2) Write the program yourself! 2

H ISTORY OF P ROGRAMMING Computer circuits are in one of two binary states: on when a signal is present or off when there is no signal present. Accordingly, computer programs are represented in binary (1’s and 0’s) at the lowest level. Called machine code, these strings of 1’s and 0’s are long and difficult to understand! Not only are they difficult to read, but they’re just as tough to write! 3

A SSEMBLY L ANGUAGES As microprocessor development continued in the 1950s, symbolic machine languages called assembly languages came into the scene. Assembly languages allow the programmer to use symbolic commands rather than cryptic binary to accomplish tasks. A program called the assembler t ranslates the source program (written in assembly) into an object program (encoded in binary) which can then be executed by your computer. 4

H IGH -L EVEL L ANGUAGES Problem: Assembly languages are designed to work on certain microprocessors. A program written on one machine will not necessarily work on another. A high-level programming language provides easy-to-use shortcut commands to the programmer with minimal drawbacks. High-level source code needs to be compiled into machine code before execution. The program that does this translation is called a compiler. High- level languages can be compiled to run on the most common types of microprocessor. 5

E XAMPLE P ROGRAM 6

I NTERPRETED LANGUAGES Problem: If I want my software to run on both Windows and Mac, I have to program and compile for two separate platforms! Solution: Interpreted languages An interpreted language uses a program called an interpreter to translate the source code in machine language statement-by-statement – it is not compiled to run on any one particular platform. 7

T HE J AVA P ROGRAMMING L ANGUAGE Released in An interpreted language, Java source code is compiled into Java bytecode. The Java Virtual Machine (JVM) interprets and runs the Java bytecode regardless of the computer architecture. Supports Object-Oriented Programming (OOP), a programming concept that allows us to represent concepts as “objects” which we can instantiate and use. 8

J AVA F UN F ACTS Most Android smartphone apps are written using Java. A large amount of the Android operating system is also written in Java Javascript, commonly used in web-based settings, is nothing like Java. Kind of. The Java syntax is very similar to C/C++. Since Java is platform-independent, it does not permit as much communication with the computer hardware as C/C++. 9

J AVA F UN F ACTS Some argue that Java is not efficient in comparison to C/C++. In Java, you can free up memory by simply not using it anymore. In C/C++, memory must be cleared by the programmer. This allows for stronger control over resources. Java has several classes that programmers can override and manipulate for special uses: Applet - programs that are embedded in other applications (commonly in web pages) Servlets – allows programmers to handle web server requests in a custom manner JavaServer Pages (JSPs) – allow for dynamic webpage creation 10

W HERE DO I TYPE MY PROGRAMS ? We will be typing our Java programs in one of two IDEs (Integrated Developer Environments): Eclipse by IBM NetBeans, an open source IDE sponsored by Oracle Both IDEs are installed on the lab computers. Last year, students used Eclipse and it was slow. This year, we’ll try NetBeans. A Java program written using Eclipse will work in NetBeans – it’s your choice! 11