An Introduction to Software Engineering. David Greenstein Monta Vista High School

Similar documents
Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Introduction to Java Programming

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Introduction to Computers and Java

Lecture 1: Overview of Java

CSE 421 Course Overview and Introduction to Java

Lecture 1: Introduction to Java

Introduction to Computers and Java

CHAPTER 1. Introduction to JAVA Programming

Java Puzzle Ball Nick Ristuccia

Introduction to Computers and Java. Objectives. Outline. Harald Gall, Prof. Dr. Institut für Informatik Universität Zürich.

Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer? A Bit of History

Chapter 1 Introduction to Computers, Programs, and Java

CHAPTER 1 Introduction to Computers and Java

What is a programming language?


Introduction to Computers and Java

Unit - IV CHAPTER - 13 INTRODUCTION TO OOP WITH C++ Part 1 Choose the best answer

Programming with Java

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1. Preliminaries

History Introduction to Java Characteristics of Java Data types

Chapter 1. Introduction

Chapter 1 Introduction to Computers, Programs, and Java

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

C++ Spring Break Packet 11 The Java Programming Language

Objects and Classes Lecture 1

From High Level to Machine Code. Compilation Overview. Computer Programs

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

9/11/08 (c) 2008 Matthew J. Rutherford Class (c) 2008 Matthew J. Rutherford Class

Principles of Programming Languages. Lecture Outline

Lecture 4: Introduction to Java and your Development Environment

Objectives. Problem Solving. Introduction. An overview of object-oriented concepts. Programming and programming languages An introduction to Java

Introduction to Java Programming CPIT 202. WEWwwbvxnvbxmnhsgfkdjfcn

Chapter 1 Introduction to Computers, Programs, and Java

Chapter 1 Introduction to Computers, Programs, and Java

Certified Core Java Developer VS-1036

Chapter 1 Introduction to Java

Programming Languages FILS Andrei Vasilateanu

Chapter. Focus of the Course. Object-Oriented Software Development. program design, implementation, and testing

Index. Course Outline. Grading Policy. Lab Time Distribution. Important Instructions

Atelier Java - J1. Marwan Burelle. EPITA Première Année Cycle Ingénieur.

Getting Started with Java. Atul Prakash

Java is a high-level programming language originally developed by Sun Microsystems and released in Java runs on a variety of

Chapter 1. Preliminaries

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

Chapter 1: Introduction to Computers, Programs, and Java

Introduction to Programming (Java) 2/12

Introduction to Java

Unit 6 - Software Design and Development LESSON 1 INTRODUCTION

Objectives. Chapter 1 Introduction to Computers, Programs, and Java. What is a Computer?

Computer Software: Introduction

Fundamentals of Programming. By Budditha Hettige

Java language. Part 1. Java fundamentals. Yevhen Berkunskyi, NUoS

Chapter 1 Preliminaries

Java Language. Programs. Computer programs, known as software, are instructions to the computer. You tell a computer what to do through programs.

1. Introduction. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

Programming Languages and Program Development

II. Compiling and launching from Command-Line, IDE A simple JAVA program

Module 1: Introduction to Computers, Programs, and Java

Seminar report Java Submitted in partial fulfillment of the requirement for the award of degree Of CSE

Introduction to OOP Using Java Pearson Education, Inc. All rights reserved.

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

Introduction to Java. Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved.

Lesson 01 Introduction

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Chapter 1: An Overview of Computers and Programming Languages. Objectives. Objectives (cont d.) Introduction

Software. Software. Software. Program Language. Programs written for the ENIAC

Object Oriented Concepts and Programming (CSC244) By Dr. Tabbasum Naz

Programming 1 - Honors

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

How to Install (then Test) the NetBeans Bundle

BITG 1113: Introduction To Computers And Programming Language LECTURE 1 LECTURE 1 1

Identifiers. Identifiers are the words a programmer uses in a program Some identifiers are already defined. Some are made up by the programmer:

Assoc. Prof. Dr. Marenglen Biba. (C) 2010 Pearson Education, Inc. All rights reserved.

MARS AREA SCHOOL DISTRICT Curriculum TECHNOLOGY EDUCATION

Computer Fundamentals: Pradeep K. Sinha & Priti Sinha

Chapter 14 Operating Systems

Chapter 14 Operating Systems

Lesson 2: First Java Programs

Computers in Engineering COMP 208. Computer Structure. Computer Architecture. Computer Structure Michael A. Hawker

Module 1: Introduction

Concepts of Programming Languages

0 Introduction: Computer systems and program development

Fundamentals of Programming INTRODUCTION

Learning objectives. The Java Environment. Java timeline (cont d) Java timeline. Understand the basic features of Java

Programming Syntax and Style. David Greenstein Monta Vista High School

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

assembler Machine Code Object Files linker Executable File

What is a VM? Categories of Virtual Machines. Process Virtual Machine 11/17/2010

Programming. Loriano Storchi.

Module 1: Introduction. What is an Operating System?

Fundamentals of Programming. By Budditha Hettige

CISC 124: Introduction To Computing Science II

Introduction to Computers and Java

Java Programming Language Mr.Rungrote Phonkam

CS 113: Introduction to

Transcription:

An Introduction to Software Engineering David Greenstein Monta Vista High School

Software Today

Software Development Pre-1970 s - Emphasis on efficiency Compact, fast algorithms on machines with limited memory Required long learning curve, cryptic code Today Emphasis on programmer productivity, team development, reusable code, maintainable code, portable code Relatively user-friendly code

Evolution of Computer Architecture Pre-Programmable machines Fixed machines - the instructions were in the design Wired machines - the instructions were in the wiring Early stored program machines Program by loading cards, tape, etc. Von Neumann architecture Modern computer architecture Stores both the instructions and the data Modified Harvard machine Special-purpose processors, like a GPU Two sets of registers: one dedicated for instructions and the other for data

Modern Von Neumann Architecture Needs a high-level language

High-level Language Timeline (Abridged) FORTRAN (1956) - FORmula TRANslator, for scientific applications COBOL (1960) - for business applications Pascal and C (1970 s) - block structured C++ (1980 s) - the OOP version of C Java (1990 s) - a platform-independent language for the Internet, also OOP 1950 1960 1970 1980 1990 2000 2010 2020 Fortran COBOL C Pascal C++ Java

OOP - Object-Oriented Programming OOP models a world of active objects. An object has memory or state, and can contain other objects. An object has behaviors or methods that process messages from other objects. An object s method can change it s state, send messages to other objects, and create new objects. An object belongs to a particular class. A class determines the functionality of all objects that belong to that class. Programmers define classes to create an OOP application.

Main OOP Concepts Inheritance: a subclass can take on all of the attributes (states) and behaviors (methods) of another class, can redefine those behaviors, add new behaviors, and add new attributes.

Main OOP Concepts Polymorphism: to process objects differently based upon their data types Mammals Function: eats() Function: eats() eats() is defined differently for each.

Main OOP Concepts Encapsulation: keeps the data and code safe from outside influence

OOP Benefits Easier to reuse components Easier to maintain Allows for team development

High-level Language Development Environments

File Types source code - a file that contains the program in a programming language object code - a file that is generated by the compiler which contains the program in a form specific to the CPU machine code - an executable file that runs on a specific CPU bytecode - a file generated by the Java compiler that can be run by the Java interpreter. It is neither object nor machine code!

C Program (Compiler Paradigm) Development Phase Editor Source Code Compiler Object Code Linker Machine Code Execution Phase Machine Code Library OS Advantages ready to run fast execution uses little memory source code is private Disadvantages executes only on one CPU (must be ported ) lots of steps, slow turnaround inflexible

Source Code BASIC Program (Interpreter Paradigm) Development Phase Editor Execution Phase Source Code Interpreter OS Advantages portable between CPUs dynamic typing and scoping simple to test easy to debug Disadvantages slower than other paradigms uses more memory requires interpreter specific to each CPU and OS source code not private Library

Java Program (Compiler + Interpreter Paradigm) Development Phase Editor Library Source Code Compiler Execution Phase Bytecode (javac) Interpreter (java) Bytecode OS Advantages Bytecode portable between CPUs and OSs runs faster than Interpreter Paradigm source code is private interpreter can perform extra checking (like virus checking) Disadvantages every code change requires recompiling requires compiler and interpreter ported to each CPU and OS generally slower than Compiler Paradigm

Programs for Development editor - a program that provides the user a GUI to input text and output a source file compiler - a program that converts high-level code into object code (for CPU) or bytecode (for Virtual Machine) linker - a program that links the object code with prebuilt library functions interpreter - a program that reads and executes source code or bytecode, and contains an embedded linker

Java Compiler Checks program syntax - reports syntax errors based on strict syntactic rules Creates bytecode file - only when there are no syntax errors % javac MyPerfectProgram.java MyPerfectProgram.java:7: cannot find symbol symbol : variable i location: class MyPerfectProgram i = 1; ^ MyPerfectProgram.java:8: incompatible types found : int required: boolean for (int a; 5; a++) ^ 2 errors %

Java Interpreter Links and executes the bytecode program Allocates memory during runtime Catches and reports runtime errors - allows for a graceful exit to the OS if there is a problem % java HereWeGo Exception in thread "main" java.lang.arrayindexoutofboundsexception: 5 at HereWeGo.main(HereWeGo.java:10) %

Layers of a Simple Calculator User Functions Stored in ROM Processor

Layers in a Computer User Application Operating System Drivers BIOS Stored on Secondary Storage Stored in ROM CPU

The Java Development Environment

JDK - Java Development Kit javac Java compiler java Java interpreter javadoc Generates HTML documentation from the source code jar Creates a Java package file (JAR file) Command line tools, no GUI

JDK - Java Development Kit (cont.) Originally developed by Sun Computer (now Oracle) Jim Gosling - Father of Java Download is available for all OS platforms (we use runtime version 7 in the lab) For PC or Linux: Google jdk 7 For Mac: Google legacy jdk 6 mac (unfortunately, must have maintenance agreement to get version 7)

IDE (Integrated Development Environment) GUI frontend for programming languages Integrates editor, compiler, interpreter, and debugger into one tool Popular IDEs for Java Eclipse BlueJ NetBeans The IDE good, bad, and ugly Good: Speeds the development process. Bad: Hinders the process of learning languages. Mr Greenstein does not provide help if you have an IDE problem. Ugly: Constant use could negatively affect your grade! My advice: DO NOT USE IDE!

Text Editor Creates the Java source code file Recommend using bare-bones editors For Linux we recommend Geany For PC we recommend NotePad or Sublime For Mac we recommend BBEdit (free version)

Questions???