Welcome to COMP 1001 First Year Computer Science Lecturer: Fintan Costello.

Slides:



Advertisements
Similar presentations
Programming for Beginners
Advertisements

 Draft timetable has the same times as this semester: - ◦ Monday 9:00 am to 12:00 noon, 1:00 pm to 3:00 pm. ◦ Tuesday 9:00 am to 12:00 noon, 1:00 pm.
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. OBJECTIVES FOR THIS UNIT Upon completion of this unit, you should be able to: Explain the Java virtual machine.
JAVA BASICS SYNTAX, ERRORS, AND DEBUGGING. GCOC – A.P. Computer Science A College Board Computer Science A Topics Covered Program Design - Read and understand.
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.
Python Programming Chapter 1: The way of the program Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
How to Create a Java program CS115 Fall George Koutsogiannakis.
Excerpts from Introduction to Java Programming, 4E Author: Y. Daniel Liang (Copyright by Prentice Hall)
Lecturer: Fintan Costello Welcome to Hdip 001 Introduction to Programming.
School of Computing Science CMT1000 Ed Currie © Middlesex University Lecture 2: 1 CMT1000: Introduction to Programming Ed Currie Lecture 2B: Programming.
Aalborg Media Lab 21-Jun-15 Software Design Lecture 1 “ Introduction to Java and OOP”
01 Introduction1June Introduction CE : Fundamental Programming Techniques.
 2003 Prentice Hall, Inc. All rights reserved. Customized by Sana Odeh for the use of this class. 1 Introduction to Computers and Programming in JAVA.
Welcome to COMP Computer Programming 1 Lecturer: Fintan Costello.
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.
Programming Fundamentals (750113) Ch1. Problem Solving
A tour around Java General introduction to aspects of the language (these will be covered in more detail later) After this tour you should have a general.
Methods: a first introduction Two ways to make tea: 1: boil water; put teabag into cup;... etc : tell your younger brother: makeTea(1 milk, 0 sugar);
Programming. Software is made by programmers Computers need all kinds of software, from operating systems to applications People learn how to tell the.
COMPUTER SCIENCE 10: INTRODUCTION TO COMPUTER SCIENCE Dr. Natalie Linnell with credit to Cay Horstmann and Marty Stepp.
1 Building Java Programs Chapter 1: Introduction to Java Programming These lecture notes are copyright (C) Marty Stepp and Stuart Reges, They may.
Unit 2: Java Introduction to Programming 2.1 Initial Example.
CS190/295 Programming in Python for Life Sciences: Lecture 1 Instructor: Xiaohui Xie University of California, Irvine.
ITP © Ron Poet Lecture 1 1 IT Programming Introduction.
Introducing Java.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
CS 106 Introduction to Computer Science I 01 / 25 / 2010 Instructor: Michael Eckmann.
CS161 Topic #21 CS161 Introduction to Computer Science Topic #2.
Chapter 1 CSIS-120: Java Intro. What is Programming?  A: It is what makes computer so useful.  The flexibility of a computer is amazing  Write a term.
The Java Programming Language
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
JAVA BASICS: Variables and References SYNTAX, ERRORS, AND DEBUGGING.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Week 1 - Friday.  What did we talk about last time?  Our first Java program.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
How to Run a Java Program CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
Problem Solving Techniques. Compiler n Is a computer program whose purpose is to take a description of a desired program coded in a programming language.
Lecture 1 Introduction Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
FIRST JAVA PROGRAM. JAVA PROGRAMS Every program may consist of 1 or more classes. Syntax of a class: Each class can contain 1 or more methods. public.
CPSC 121: Models of Computation Unit 0 Introduction George Tsiknis Based on slides by Patrice Belleville and Steve Wolfman.
Introduction to programming in the Java programming language.
First Programs CSE 1310 – Introduction to Computers and Programming Vassilis Athitsos University of Texas at Arlington 1.
Review, Pseudocode, Flow Charting, and Storyboarding.
1 CS161 Introduction to Computer Science Topic #9.
1 WELCOME TO CIS 1068! Instructor: Alexander Yates.
CS 106 Introduction to Computer Science I 01 / 22 / 2007 Instructor: Michael Eckmann.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 1 Introduction to Computers, Programs,
Computer Science Reaching Wider Summer School 2012.
Lecture1 Instructor: Amal Hussain ALshardy. Introduce students to the basics of writing software programs including variables, types, arrays, control.
CS 177 Recitation Week 1 – Intro to Java. Questions?
ITP 109 Week 2 Trina Gregory Introduction to Java.
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Sequences, Modules and Variables David Millard
Comp1004: Programming in Java II Computational Thinking.
Welcome to CSE 142! Zorah Fung University of Washington, Summer Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs.
Welcome to Introduction to Psychology! Let’s share a bit about where we are all from…
Copyright 2010 by Pearson Education APCS Building Java Programs Chapter 1 Lecture 1-1: Introduction; Basic Java Programs reading:
Introduction to programming in java
Topic: Programming Languages and their Evolution + Intro to Scratch
String Output ICS 111: Introduction to Computer Science I
How to Run a Java Program
Comp1202: Building Better Programs
Programming Fundamentals (750113) Ch1. Problem Solving
How to Run a Java Program
Programming.
Zorah Fung University of Washington, Spring 2015
Zorah Fung University of Washington, Winter 2016
Presentation transcript:

Welcome to COMP 1001 First Year Computer Science Lecturer: Fintan Costello

Where you are  COMP 1001:  Introduction to Programming Fintan)  Information Technology Joe Carthy )  This class includes:  Science students  Computer Science Denominated Entry students  BA Computer Science students  Actuarial & Financial students

Resources for the programming course Textbook: Introduction to JAVA Programming, Y. Daniel Liang. Prentice Hall, 4th ed. Campus bookstore. We’ll be using this textbook a lot: you should get it. Make sure you get the 4 th edition! Web site: Look here to find these slides, course rules and instructions, exam info, practicals, and so on. Owen Fallon extn 2917) is your student advisor: he’s there to help with any

What will you learn on this course? How to make a computer do what you want: Write programs to quickly solve complex problems You will also develop a useful attitude towards computers Not to be afraid when things go wrong, but to debug Write programs to process information in various ways Write programs to respond to different situations. To try things on your computer and learn from your mistakes To solve problems in a clear, unambiguous and precise way.

Why would you want to learn this? Everyone should be able to do some programming (it’s the 21 st century version of being able to type) Being able to program allows you to create useful tools in any area of study Psychology:Computational theory of mind is dominant in psychology today Languages:Programming is closely related to linguistics Using and programming automated translation aids is part of the work of a professional translator

Why learn programming? More reasons Physics:Computational simulation Genetics:Computational analysis of gene structure Large-scale experiments run by computer Business:Runs on computer program infrastructure genome projects run by computer Programs to predict market performance, test implications of economic changes There is no area where a knowledge of programming is not a noticable advantage

Ireland needs programmers! From Fourth Report of the Expert Group on Future Skills Needs presented to the Tánaiste and Minister for Enterprise, Trade and Employment and Minister for Education and Science, October YearDemand for New Computer Graduates Number of New Computer Graduates Gap 20062,8071, ,0941,583-1, ,4171,563-1, ,7771,535-2,242

COMP 1001 intro to programming: what you do Attend programming lectures twice weekly Attend practicals once weekly (1 * 2 hours) Textbook is required reading Marks based on practical work, plus 2 Exams (Christmas: MCQ exam, Summer: Full written exam) Attend architecture lectures once weekly

COMP 1001: Grading details Practical work must be done correctly and submitted (25%) Christmas Programming & IT multiple choice exam (15%) Summer Programming & IT full written exam (60%) Practical work must be satisfactory to pass COMP 1001

Programs and algorithms: some terms A program is a series of instructions or commands to a computer Running a program == carrying out the instructions A well written program implements an algorithm which solves a problem An algorithm is a precise description of how to solve a problem

Algorithm for making tea boil water; put teabag into cup; pour water into cup until full; wait 3 minutes; remove teabag; if (want milk){ put milk into cup; } if (want sugar){ put sugar into cup; } stir;

Algorithms An ALGORITHM is: 1. Unambiguous 2. Executable 3. Terminating

Problem: open a door Algorithm: read sign on door; if (sign says "pull") { pull the door open; } else { push the door open; } Will this work for all doors?

Problem: Say hello to someone Algorithm: Ask the person’s name; Remember their name: NAME  their name; Say(“Hello “ + NAME);

Programming languages Natural languages: French, English, Swahili… Programming languages: C, perl, Java... Natural languages are forgiving: if you have wrong the grammar, pronounciation, or speling, people can still understanding you be. Computers are not as smart as people: if you don’t have your program’s grammar and spelling exactly right, the computer will not understand and will give an error

Your first java program Welcome.java (L, p. 15) // Welcome.java: this application prints // a welcome message public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java"); }

Reseved words // Welcome.java: this program prints // a welcome message public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java"); } The words in bold are reserved words: they mean something special in the java programming language. Reserved words are case-sensitive: P ublic is wrong.

What do these words mean? // Welcome.java: this program prints // a welcome message public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java"); } class is a word that identifies something as a program in java public is a modifier which identifies something as publicly accessible (other programs can “call” it, which means run it) main identifies the main part of a program (the bit that does most of the work). We’ll explain static and void later.

Blocks {......} A block is a sequence of code between matching curly brackets This block identifies everything that is in the public class Welcome This block identifies everything that is in the main part of the class. // Welcome.java: this program prints // a welcome message public class Welcome { public static void main(String[] args) { System.out.println("Welcome to Java"); }

Statements A statement is an action. A statement ends with a semi-colon ; System.out.println("Welcome..."); println means ‘print this on a line of its own’ (you can also use print, which doesn’t start a new line). System.out means that println is an action carried out by the out put part of a set of Java programs which you can use to interact with your computer’s System. We’ll learn more about this later when we talk about methods

Comments in Java Comments are simply notes for the programmer to remind themseleves and other programmers what a program is meant to do. Comments can contain any text you like // this is a one line comment // and here is another /* this comment can extend over several lines */ Comments are not java commands. Always comment your programs! It helps you remember what’s going on.