ITEC 320 Procedural Programming Dr. Ray Lecture 1.

Slides:



Advertisements
Similar presentations
Foundations of Programming and Problem Solving Introduction.
Advertisements

Today’s lecture Review of Chapter 1 Go over homework exercises for chapter 1.
ITEC 320 Lecture 3 In-class coding / Arrays. Arrays Review Strings –Advantages / Disadvantages Input –What two methods are used? Conditionals Looping.
1 Chapter 2 Introduction to Java Applications Introduction Java application programming Display ____________________ Obtain information from the.
CMT Programming Software Applications
1 9/20/06CS150 Introduction to Computer Science 1 Review: Exam 1.
Datalogi A 1: 8/9. Book: Cay Horstmann: Big Java or Java Consepts.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Lecture 2: Topics Bits and Bytes Primitive Types Casting Strings Boolean expressions.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
COMP 14: Primitive Data and Objects May 24, 2000 Nick Vallidis.
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
ITEC 380 Organization of programming languages Dr. Andrew Ray.
ITEC 320 Lecture 16 Packages (1). Review Questions? –HW –Exam Nested records –Benefits –Downsides.
IT253: Computer Organization Lecture 4: Instruction Set Architecture Tonga Institute of Higher Education.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
1 計算機程式設計 Introduction to Computer Programming Lecture01: Introduction and Hello World 9/10/2012 Slides modified from Yin Lou, Cornell CS2022: Introduction.
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
CSE 131 Computer Science 1 Module 1: (basics of Java)
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Summary of what we learned yesterday Basics of C++ Format of a program Syntax of literals, keywords, symbols, variables Simple data types and arithmetic.
CSC 1051 – Data Structures and Algorithms I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website:
Type Conversions Implicit Conversion Explicit Conversion.
Copyright 2008 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
Mixing integer and floating point numbers in an arithmetic operation.
ISBN Chapter 6 Data Types Introduction Primitive Data Types User-Defined Ordinal Types.
1 CS 007: Introduction to Computer Programming Ihsan Ayyub Qazi.
Chapter 2 Variables.
ITEC 352 Computer Organization Dr. Ray Lecture 1.
Copyright 2010 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
Chapter 3 The General Structure of Ada Programs. General Form of an Ada Program With package1; With package2;... With packagen; Procedure pname IS - -
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Introduction to programming in java Lecture 22 Arrays – Part 2 and Assignment No. 3.
ITEC 320 Lecture 6 More on arrays / Strings. Arrays Review Scope Exceptions Arrays –Dynamic arrays How? Typed and anonymous.
UFCFY5-30-1Multimedia Studio Coding for Interactive Media Fundamental Concepts.
Lecture 3: More Java Basics Michael Hsu CSULA. Recall From Lecture Two  Write a basic program in Java  The process of writing, compiling, and running.
Copyright 2010 by Pearson Education 1 Building Java Programs Chapter 2 Lecture 2-1: Expressions and Variables reading:
Primitive data types Lecture 03. Review of Last Lecture Write a program that prints the multiplication table of 5. class MultiplicationTable { public.
ECE Application Programming
Type Checking Generalizes the concept of operands and operators to include subprograms and assignments Type checking is the activity of ensuring that the.
Building Java Programs
Chapter 6: Data Types Lectures # 10.
Multiple variables can be created in one declaration
Primitive Data, Variables, Loops (Maybe)
Type Conversion, Constants, and the String Object
Type Conversion, Constants, and the String Object
An Introduction to Java – Part I, language basics
Building Java Programs
Building Java Programs
Variables, Types, Operations on Numbers
Building Java Programs Chapter 2
Variables, Types, Operations on Numbers
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Building Java Programs
Summary of what we learned yesterday
Building Java Programs
Building Java Programs
Building Java Programs Chapter 2
Building Java Programs
Data Types Every variable has a given data type. The most common data types are: String - Text made up of numbers, letters and characters. Integer - Whole.
Lecture 22: Number Systems
Building Java Programs
Building Java Programs
Building Java Programs
Presentation transcript:

ITEC 320 Procedural Programming Dr. Ray Lecture 1

Introduction Outline Welcome Intro to the course Ada – first steps

Introduction Syllabus R Lectures / Interactive demonstrations Office Hours 2:00-3:00 PM MTWF –Saturday 7:00-8:00PM or Sun. 3:00-4:00 Website – => ITEC 320 D2L for submission Projects Homework Exams

Introduction On a scale of 1 to 10, how interested are you in learning a different language? How many lines of code did you write for the largest program you’ve worked on? What do you want to learn in this course? Share with your neighbor Introduce yourselves and answers to the class

Introduction Language s What advantages are there to learning a new computer language? What are the some of the reasons for learning a new language? Why is this important? –Objective C example

Introduction 1970s The era of… Multiple languages used at the DOD… What are some of the problems with using multiple languages? What happens when you use multiple languages for one project?

Introduction Solution Design competition

Introduction Result Procedural / OO mixed language Multi-threaded / generics Reliability and maintenance Readability over writability $line =~ /.{28}(\d\d)-(\d\d)-(\d\d).{8}(.+)$/

Introduction Difference s Java Ada public class HelloWorld { public static void main(String[] args) { int x; x=3; System.out.println(x); } with ada.text_io; with ada.integer_text_io; procedure hello1 is x: Integer; begin x := 3; ada.text_io.put_line("Hello World"); ada.integer_text_io.put(x); end hello1;

Introduction First impressions What are your thoughts on what you just saw? with ada.text_io; with ada.integer_text_io; procedure hello1 is x: Integer; begin x := 3; ada.text_io.put_line("Hello World"); ada.integer_text_io.put(x); end hello1;

Introduction How to make it work Write / Compile / Execute cycle Editors –vi filename.adb Compiler –gnatmake filename Execution –filename or./filename (Mac)

Introduction Types Why is it important to know what type of variable it is that you are using? What are the different types of variables you are familiar with?

Introduction Informatio n Largest and smallest numbers possible Integer add –‘first; –‘last; –‘range; Character –‘val(65); –‘pos(‘A’); Boolean –Boolean’val(0); –Boolean’pos(true);

Introduction Extra types Natural –0 to Integer’Last --Biggest integer Positive –1 to Integer’Last Chance –0.0 to Constrained float

Introduction More types Character (8 bit) Wide_Character (16 bit) Wide_Wide_Character (32 bit) Strings –Arrays of characters –Fixed length –3 types (more later)

Introduction Conversio n Anything to String String to Integer Character conversions intVar’img intVar’image Integer’val(“12”); Integer’value(“123”); Character’val(65); Character’pos(‘A’);

Introduction Output Convert non-strings to strings –Combine strings with the & Output and stay on same line –put( ); Output and goto next line –put_line( ); Enter key –new_line;

Introduction Formatting Output width –minimum width fore –Minimum number of places before decimal aft –Number of places after decimal exp –Minimum number of places for the exponent put(var, width=>2);

Introduction Type checking Both sides of assignments must match Operands of arithmetic operators must match Must do it all manually –In Java, int’s will be converted to floats Extends to output –System.out.println how we will miss thee –ada.integer_text_io.put(3); –ada.text_io.put(“Lots of typing”);

Introduction Summary Short day History of ADA Basics of the language Introductory comparison of the languages