Εισαγωγή στον Προγραμματισμό Introduction to Programming

Σχετικά έγγραφα
Lecture 1: Introduction to Programming & Programs

Προγραμματισμός Χειμερινό Εξάμηνο 2014

Προγραμματισμός Χειμερινό Εξάμηνο 2017

Χειµερινό Εξάµηνο 2013

Προγραμματισμός. Εαρινό Εξάμηνο 2011

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Test Data Management in Practice

BECAUSE WE REALLY WANT TO KNOW WHAT YOU THINK ABOUT SCHOOL AND YOUR GARDEN. Fairly true If I decide to learn something hard, I can.

derivation of the Laplacian from rectangular to spherical coordinates

The Simply Typed Lambda Calculus

Εγκατάσταση λογισμικού και αναβάθμιση συσκευής Device software installation and software upgrade

ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ ΣΕ ΕΙΔΙΚΑ ΘΕΜΑΤΑ ΔΙΕΘΝΩΝ ΣΧΕΣΕΩΝ & ΟΙΚΟΝΟΜΙΑΣ

ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ ΣΕ ΕΙΔΙΚΑ ΘΕΜΑΤΑ ΔΙΕΘΝΩΝ ΣΧΕΣΕΩΝ & ΟΙΚΟΝΟΜΙΑΣ

C.S. 430 Assignment 6, Sample Solutions

ΑΓΓΛΙΚΑ Ι. Ενότητα 7α: Impact of the Internet on Economic Education. Ζωή Κανταρίδου Τμήμα Εφαρμοσμένης Πληροφορικής

Section 1: Listening and responding. Presenter: Niki Farfara MGTAV VCE Seminar 7 August 2016

LESSON 14 (ΜΑΘΗΜΑ ΔΕΚΑΤΕΣΣΕΡΑ) REF : 202/057/34-ADV. 18 February 2014

Μηχανική Μάθηση Hypothesis Testing

Πανεπιστήμιο Δυτικής Μακεδονίας. Τμήμα Μηχανικών Πληροφορικής & Τηλεπικοινωνιών. Ηλεκτρονική Υγεία

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

ΦΥΛΛΟ ΕΡΓΑΣΙΑΣ Α. Διαβάστε τις ειδήσεις και εν συνεχεία σημειώστε. Οπτική γωνία είδησης 1:.

Instruction Execution Times

ίκτυο προστασίας για τα Ελληνικά αγροτικά και οικόσιτα ζώα on.net e-foundatio // itute: toring Insti SAVE-Monit

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

ΑΓΓΛΙΚΑ IV. Ενότητα 6: Analysis of Greece: Your Strategic Partner in Southeast Europe. Ιφιγένεια Μαχίλη Τμήμα Οικονομικών Επιστημών

2016 IEEE/ACM International Conference on Mobile Software Engineering and Systems

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ

Χρειάζεται να φέρω μαζί μου τα πρωτότυπα έγγραφα ή τα αντίγραφα; Asking if you need to provide the original documents or copies Ποια είναι τα κριτήρια

Lecture 2. Soundness and completeness of propositional logic

PRESENTATION TITLE PRESENTATION SUBTITLE

Démographie spatiale/spatial Demography

FORTRAN και Αντικειμενοστραφής Προγραμματισμός

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Επίλυση Προβλήματος σε Προγραμματιστικό Περιβάλλον από Παιδιά Προσχολικής Ηλικίας

Modbus basic setup notes for IO-Link AL1xxx Master Block

2 Composition. Invertible Mappings

Example Sheet 3 Solutions

Ψηφιακή Οικονομία. Διάλεξη 11η: Markets and Strategic Interaction in Networks Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Πώς μπορεί κανείς να έχει έναν διερμηνέα κατά την επίσκεψή του στον Οικογενειακό του Γιατρό στο Ίσλινγκτον Getting an interpreter when you visit your

Galatia SIL Keyboard Information

Ανάπτυξη διαδικτυακής διαδραστικής εκπαιδευτικής εφαρμογής σε λειτουργικό σύστημα Android

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

ΕΘΝΙΚΟ ΜΕΤΣΟΒΙΟ ΠΟΛΥΤΕΧΝΕΙΟ

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

CS 150 Assignment 2. Assignment 2 Overview Opening Files Arrays ( and a little bit of pointers ) Strings and Comparison Q/A

Homework 3 Solutions

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

Block Ciphers Modes. Ramki Thurimella

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Κατανοώντας και στηρίζοντας τα παιδιά που πενθούν στο σχολικό πλαίσιο

ΑΝΑΠΤΥΞΗ ΠΑΙΧΝΙΔΙΟΥ ΣΟΒΑΡΟΥ ΣΚΟΠΟΥ ΓΙΑ ΤΗΝ ΕΚΜΑΘΗΣΗ ΕΝΝΟΙΩΝ ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΟΥΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΥ ΣΕ JAVA

TMA4115 Matematikk 3

Advanced Subsidiary Unit 1: Understanding and Written Response

6.1. Dirac Equation. Hamiltonian. Dirac Eq.

Chapter 2 * * * * * * * Introduction to Verbs * * * * * * *

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Στεγαστική δήλωση: Σχετικά με τις στεγαστικές υπηρεσίες που λαμβάνετε (Residential statement: About the residential services you get)

Μετανάστευση Σπουδές. Σπουδές - Πανεπιστήμιο. Για να δηλώσετε ότι θέλετε να εγγραφείτε

EE512: Error Control Coding

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Ασφάλεια σε χώρους αναψυχής: Ένα σύστημα από έξυπνα αντικείμενα

Example of the Baum-Welch Algorithm

Section 9.2 Polar Equations and Graphs

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 9η: Basics of Game Theory Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

PRESENTATION TITLE PRESENTATION SUBTITLE

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ

ΓΗΠΛΧΜΑΣΗΚΖ ΔΡΓΑΗΑ ΑΡΥΗΣΔΚΣΟΝΗΚΖ ΣΧΝ ΓΔΦΤΡΧΝ ΑΠΟ ΑΠΟΦΖ ΜΟΡΦΟΛΟΓΗΑ ΚΑΗ ΑΗΘΖΣΗΚΖ

ΕΘΝΙΚΗ ΣΧΟΛΗ ΗΜΟΣΙΑΣ ΙΟΙΚΗΣΗΣ

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Οι αδελφοί Montgolfier: Ψηφιακή αφήγηση The Montgolfier Βrothers Digital Story (προτείνεται να διδαχθεί στο Unit 4, Lesson 3, Αγγλικά Στ Δημοτικού)

Partial Trace and Partial Transpose

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ Ανώτατο Εκπαιδευτικό Ίδρυμα Πειραιά Τεχνολογικού Τομέα. Ξένη Ορολογία. Ενότητα 6: Working Capital

Επιβλέπουσα Καθηγήτρια: ΣΟΦΙΑ ΑΡΑΒΟΥ ΠΑΠΑΔΑΤΟΥ

Δομημένος Προγραμματισμός

Εργαστήριο 9. Styling with Javascript

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

«ΑΓΡΟΤΟΥΡΙΣΜΟΣ ΚΑΙ ΤΟΠΙΚΗ ΑΝΑΠΤΥΞΗ: Ο ΡΟΛΟΣ ΤΩΝ ΝΕΩΝ ΤΕΧΝΟΛΟΓΙΩΝ ΣΤΗΝ ΠΡΟΩΘΗΣΗ ΤΩΝ ΓΥΝΑΙΚΕΙΩΝ ΣΥΝΕΤΑΙΡΙΣΜΩΝ»

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Data & Open Technologies A Perfect Combination Introduction Lecture

CS255 - Programming Lab

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΒΑΛΕΝΤΙΝΑ ΠΑΠΑΔΟΠΟΥΛΟΥ Α.Μ.: 09/061. Υπεύθυνος Καθηγητής: Σάββας Μακρίδης

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΑΤΡΩΝ ΠΟΛΥΤΕΧΝΙΚΗ ΣΧΟΛΗ ΤΜΗΜΑ ΜΗΧΑΝΙΚΩΝ Η/Υ & ΠΛΗΡΟΦΟΡΙΚΗΣ. του Γεράσιμου Τουλιάτου ΑΜ: 697

Living and Nonliving Created by: Maria Okraska

PortSip Softphone. Ελληνικά Ι English 1/20

Paper Reference. Paper Reference(s) 1776/04 Edexcel GCSE Modern Greek Paper 4 Writing. Thursday 21 May 2009 Afternoon Time: 1 hour 15 minutes

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

TaxiCounter Android App. Περδίκης Ανδρέας ME10069

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ - ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΕΠΛ 133: ΑΝΤΙΚΕΙΜΕΝΟΣΤΡΕΦΗΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ ΕΡΓΑΣΤΗΡΙΟ 3 Javadoc Tutorial

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

1 η ΕΝΟΤΗΤΑ ΕΙΣΑΓΩΓΗ (Προγραμματισμός & MATLAB)

Transcript:

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ Εισαγωγή στον Προγραμματισμό Introduction to Programming Διάλεξη 1: Εισαγωγή στον Προγραμματισμό και τα Προγράμματα Γ. Παπαγιαννάκης

Άδειες Χρήσης - Το παρόν εκπαιδευτικό υλικό υπόκειται στην άδεια χρήσης Creative Commons και ειδικότερα Αναφορά Δημιουργού 3.0 - Μη εισαγόμενο Ελλάδα (Attribution 3.0 Unported GR) - Για εκπαιδευτικό υλικό, όπως εικόνες, που υπόκειται σε άλλου τύπου άδειας χρήσης, η άδεια χρήσης αναφέρεται ρητώς.

Χρηματοδότηση - Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί στα πλαίσια του εκπαιδευτικού έργου του διδάσκοντα. - Το έργο «Ανοικτά Ακαδημαϊκά Μαθήματα στο Πανεπιστήμιο Κρήτης» έχει χρηματοδοτήσει μόνο τη αναδιαμόρφωση του εκπαιδευτικού υλικού. - Το έργο υλοποιείται στο πλαίσιο του Επιχειρησιακού Προγράμματος «Εκπαίδευση και Δια Βίου Μάθηση» και συγχρηματοδοτείται από την Ευρωπαϊκή Ένωση (Ευρωπαϊκό Κοινωνικό Ταμείο) και από εθνικούς πόρους.

ΗΥ-150 Προγραμματισμός CS-150 Programming Lecture 1: Introduction to Programming & Programs G. Papagiannakis

Overview What is this course about? What should you already know? What will you be expected to do? What will you know when you finish What is programming Applications of programming A simple program Lecture: Introduction to Programming, Slide 5

Who am I? http://www.csd.uoc.gr/~papagian Assistant Professor of Computer Graphics, University of Crete Research Fellow, Computer Vision and Robotics Laboratory, ICS-FORTH Senior researcher and Visiting Lecturer on Computer Graphics (2006-2009), MIRALab, University of Geneva PhD in Computer Science, An illumination registration model for dynamic virtual humans in mixed reality (2002-2006) Research assistant (1999-2006), MIRALab, University of Geneva Lecture: Introduction to Programming, Slide 6

Περιεχόμενο : μέθοδοι προγραμματισμού προγραμματιστικές αρχές δομημένος προγραμματισμός, αφαιρετικότητα, (abstraction) υλοποίηση, έλεγχος, και αποσφαλμάτωση καλές πρακτικές γλώσσα προγραμματισμού: C++ Εισαγωγή Lecture: Introduction to Programming, Slide 7

Στόχοι Αλγοριθμική σκέψη & Προγραμματισμός Βάση για την Πληροφορική και Υπολογιστικά Μαθηματικά Μέθοδοι επίλυσης προβλημάτων - αλγόριθμοι Κωδικοποίηση αλγορίθμων Διόρθωση/Κατανόηση/Αλλαγή προγράμματος ενημέρωση επαναχρησιμοποίηση Lecture: Introduction to Programming, Slide 8

Γλώσσα προγραμματισμού C++ Μια από τις πιο σημαντικές γλώσσες : Έχει στοιχεία υψηλού & χαμηλού επιπέδου Γενική πολλαπλές εφαρμογές Αποδοτικά προγράμματα Συμβατότητα / πρότυπο (ISO) Σημαντικό βήμα για την εκμάθηση άλλων γλωσσών Lecture: Introduction to Programming, Slide 9

Είναι σημαντικός ο προγραμματισμός για επαγγελματική αποκατάσταση; The Doers - A TEDxAthens Documentary: http://www.youtube.com/watch?v=zxcmxt4rano&list=plbe7d87788b2430f1 Lecture: Introduction to Programming, Slide 10

Διαλέξεις Φροντιστήρια Ασκήσεις Multiple-choice quiz Τελικό Διαγώνισμα Διδασκαλία Lecture: Introduction to Programming, Slide 11

Πρόγραμμα μαθήματος Πρόγραμμα Μαθήματος Τρίτη 5-7 (Αμφ. Α) και Πέμπτη 11-1 (Αμφ. Α) Παρασκευή 5-7 (Αμφ. Α) για φροντιστήριο και αναπληρώσεις Lecture: Introduction to Programming, Slide 12

Περιεχόμενο μαθήματος Εισαγωγή στον Προγραμματισμό και στη γλώσσα προγραμματισμού C++ Τύποι Δεδομένων, Τελεστές και Αριθμητικές Εκφράσεις Είσοδος & Έξοδος Δεδομένων Εντολές επιλογής & Συνθήκες επιλογής Εντολές επανάληψης Συναρτήσεις, Εμβέλεια Μεταβλητών GUI programming, κλάσεις και αντικείμενα Πίνακες Συναρτήσεις Δομές δεδομένων Δυναμικές δομές δεδομένων Αναδρομή Αποσφαλμάτωση προγραμμάτων Τεχνικές προγραμματισμού μεγάλων προγραμμάτων, εισαγωγή στον αντικειμενοστρεφή προγραμματισμό Lecture: Introduction to Programming, Slide 13

Εμβάθυνση σε αυτό το μάθημα Πρακτικότητα Πληρότητα Εφαρμογή σε πραγματικά προβλήματα Επεκτασιμότητα Lecture: Introduction to Programming, Slide 14

Σε LINUX/MacOSX Εισαγωγή: Εργαλεία g++, μεταφραστής/compiler της C++ gdb, debugger της C++ (εύρεση λαθών) Editors : Emacs, vi, vim, gvim, pico,, XCODE για την συγγραφή προγραμμάτων Σε Windows Ολοκληρωμένα Περιβάλλοντα προγραμματισμού της C++, όπως ο δωρεάν Microsoft Visual Studio 2010 C++ express: http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visualcpp-express/ cygwin ή MinGW (http://www.mingw.org/), για προγραμματισμό Πρόταση: Στήστε ένα βολικό περιβάλλον προγραμματισμού και εξοικειωθείτε μαζί του Lecture: Introduction to Programming, Slide 15

Βοήθεια! Απορίες στο μάθημα Κατά τις ώρες των φροντιστηρίων Στις ομάδες συζητήσεων στο web-site του μαθήματος Στις ώρες γραφείου Lecture: Introduction to Programming, Slide 16

Τι είναι: Εισαγωγή: Περί Αντιγραφής Αντιγραφή κώδικα ή μέρους αυτού από άλλη πηγή (συμφοιτητή, διαδίκτυο, κάποιον τρίτο, κτλ) Αντιγραφή της ιδέας ενός αλγορίθμου (χωρίς αναφορά στις πηγές) Αντιγραφή κειμένου ή μέρους αυτού κατά την διάρκεια εξέτασης Αυτόματη ανίχνευση Συνέπειες: το λιγότερο μηδενισμός της άσκησης, διαγωνίσματος κτλ. σε όλα τα μέρη που εμπλέκονται στην αντιγραφή Όποιος αντιγράφει στον προγραμματισμό θα αντιγράφει συνέχεια: το μάθημα είναι η βάση για τα περισσότερα μαθήματα του τμήματος Μην αφήνετε τους άλλους να αντιγράψουν από εσάς. Κλειδώστε τις περιοχές σας: chmod 700 mydir chmod 600 myfile Lecture: Introduction to Programming, Slide 17

Προτάσεις Ρωτήστε, ενημερωθείτε, διαβάστε, ζητήστε βοήθεια Βοήθεια δεν προσπαθώ Εκμεταλλευτείτε τα εργαστήρια-φροντιστήρια (6) Ο προγραμματισμός μαθαίνεται μόνο με προγραμματισμό ~ ποδήλατο - κολύμβηση Υπομονή, επιμονή, προσπάθεια Η εξάσκηση (διάβασμα και προγραμματισμός) θα σας κάνει ικανούς για τη λύση ασκήσεων Καλός προγραμματιστής ~ γραμμές κώδικα που έχει γράψει Lecture: Introduction to Programming, Slide 18

Course Bibliography B. Stroustrup, Programming: Principles and Practise Using C++, Addison-Wesley, pp. 1 1268, Jul. 2009. B. Stroustrup, Προγραμματισμός με C++, Εκδόσεις Παπασωτηρίου, 2009 Lecture: Introduction to Programming, Slide 19

Abstract Today, we ll outline the aims for this course and present a rough course plan. We ll introduce the basic notion of programming and give examples of areas in which software is critical to our civilization. Finally, we ll present the simplest possible C++ program and outline how it can be made into running code. Lecture: Introduction to Programming, Slide 20

Course aims and outline Programming Hello, world! Compilation Overview Lecture: Introduction to Programming, Slide 21

In Programming For beginners who want to become professionals This is a course i.e., people who can produce systems that others will use who are assumed to be bright Though not (necessarily) geniuses who are willing to work hard Though do need sleep occasionally, and take a normal course load Using the C++ programming language Lecture: Introduction to Programming, Slide 22

A course in The C++ programming language For students Not! who want to become language lawyers We try not to get bogged down in technical obscurities who are assumed to be a bit dim and fairly lazy Using We try not to spoon feed Some untested software development methodologies and a lot of unnecessarily long words Lecture: Introduction to Programming, Slide 23

The Aims Teach/learn Fundamental programming concepts Key useful techniques Basic Standard C++ facilities After the course, you ll be able to Write small colloquial C++ programs Read much larger programs Learn the basics of many other languages by yourself Proceed with an advanced C++ programming course After the course, you will not (yet) be An expert programmer A C++ language expert An expert user of advanced libraries Lecture: Introduction to Programming, Slide 24

Lectures Attend every one Notes The Means Read notes ahead (about one per lecture) Will be posted online Read the notes again after each lecture Will be updated online Feedback is welcome (typos, suggestions, etc.) Lecture: Introduction to Programming, Slide 25

Cooperate on Learning Except for the work you hand in as individual contributions, we strongly encourage you to collaborate and help each other If in doubt if a collaboration is legitimate: ask! Don t claim to have written code that you copied from others Don t give anyone else your code (to hand in for a grade) When you rely on the work of others, explicitly list all of your sources i.e. give credit to those who did the work Don t study alone when you don t have to Form study groups Do help each other (without plagiarizing) Go to your TA's labs Go prepared with questions The only stupid questions are the ones you wanted to ask but didn t Lecture: Introduction to Programming, Slide 26

Why C++? You can t learn to program without a programming language The purpose of a programming language is to allow you to express your ideas in code C++ is the language that most directly allows you to express ideas from the largest number of application areas C++ is the most widely used language in engineering areas http://www.research.att.com/~bs/applications.html Lecture: Introduction to Programming, Slide 27

Why C++? C++ is precisely and comprehensively defined by an ISO standard And that standard is almost universally accepted C++ is available on almost all kinds of computers Programming concepts that you learn using C++ can be used fairly directly in other languages Including C, Java, C#, and (less directly) Fortran Objective-C (ios development) is also very similar to C++ Lecture: Introduction to Programming, Slide 28

Part I: The basics Course outline in Parts Types, variables, strings, console I/O, computations, errors, vectors functions, source files, classes Part II: Input and Output File I/O, I/O streams Graphical output Graphical User Interface Part III: Data structures and algorithms Free store, pointers, and arrays Lists, maps, sorting and searching, vectors, templates The STL Part IV: Broadening the view Software ideals and history Text processing, numerics, embedded systems programming, testing, C, etc. Lecture: Introduction to Programming, Slide 29

Rough course outline (Cont.) Throughout Program design and development techniques C++ language features Background and related fields, topics, and languages Note: Appendices C++ language summary C++ standard library summary Index (extensive) Glossary (short) Lecture: Introduction to Programming, Slide 30

Promises Detail: We will try to explain every construct used in this course in sufficient detail for real understanding There is no magic Utility: We will try to explain only useful concepts, constructs, and techniques We will not try to explain every obscure detail Completeness: The concepts, constructs, and techniques can be used in combination to construct useful programs There are, of course, many useful concepts, constructs, and techniques beyond what is taught here Lecture: Introduction to Programming, Slide 31

More Promises Realism: the concepts, constructs, and techniques can be used to build industrial strength programs i.e., they have been used to Simplicity: The examples used are among the simplest realistic ones that illustrate the concepts, constructs, and techniques Your exercises and projects will provide more complex examples Scalability: The concepts, constructs, and techniques can be used to construct large, reliable, and efficient programs i.e., they have been used to Lecture: Introduction to Programming, Slide 32

Feedback request Please post questions and constructive comments to the web-site discussion forums (not mailing list) Your feedback will be most appreciated On style, contents, detail, examples, clarity, conceptual problems, exercises, missing information, depth, etc. Local course support website forums: http://www.csd.uoc.gr/~hy150b (https://elearn.uoc.gr/course/view.php?id=160) Ανακοινώσεις, νέα, ειδήσεις Γενικά (θεωρία, εργαλεία, compiliers, IDE) Άσκηση 1 Άσκηση 2 Άσκηση 3 Άσκηση 4 Lecture: Introduction to Programming, Slide 33

Why programming? Our civilization runs on software Most engineering activities involve software Note: most programs do not run on things that look like a PC a screen, a keyboard, a box under the table Lecture: Introduction to Programming, Slide 34

Ships Design Construction Management Monitoring Engine Hull design Pumps Lecture: Introduction to Programming, Slide 35

Aircraft Communication Control Display Signal processing Gadget control Monitoring Lecture: Introduction to Programming, Slide 36

Phones Voice quality User interfaces Billing Mobility Switching Reliability Provisioning Images Lecture: Introduction to Programming, Slide 37

Energy Control Monitoring Analysis Communications Visualization Manufacturing Design Lecture: Introduction to Programming, Slide 38

Computer Graphics Movie Industry 3D Computer games Scientific visualization Computer Aided Design (CAD) Virtual and Augmented Reality Digital photography and video Human Computer Interaction Art Lecture: Introduction to Programming, Slide 39

PC/workstation/mobile There s a lot more to computing than games, word processing, browsing, and spreadsheets! Lecture: Introduction to Programming, Slide 40

Just about everywhere Where is C++ Used? Android, ios, Mars rovers, animation, graphics, Photoshop, GUI, OS, compilers, slides, chip design, chip manufacturing, semiconductor tools, etc. See www.research.att/~bs/applications.html Lecture: Introduction to Programming, Slide 41

A first program just the guts // int main() // main() is where a C++ program starts { cout << "Hello, world!\n"; // output the 13 characters Hello, world! // followed by a new line return 0; // return a value indicating success } // quotes delimit a string literal // NOTE: smart quotes will cause compiler problems. // so make sure your quotes are of the style " " // \n is a notation for a new line Lecture: Introduction to Programming, Slide 42

A first program complete // a first program: #include "std_lib_facilities.h" // get the library facilities needed for now int main() // main() is where a C++ program starts { cout << "Hello, world!\n"; // output the 13 characters Hello, world! // followed by a new line return 0; // return a value indicating success } // note the semicolons; they terminate statements // curly brackets { } group statements into a block // main( ) is a function that takes no arguments ( ) // and returns an int (integer value) to indicate success or failure Lecture: Introduction to Programming, Slide 43

A second program // modified for Windows console mode: #include "std_lib_facilities.h" // get the facilities for this course from the site int main() // main() is where a C++ program starts { cout << "Hello, world\n"; // output the 13 characters hello, world! // followed by a new line keep_window_open(); // wait for a keystroke return 0; // return a value indicating success } // without keep_window_open() the output window will be closed immediately // before you have a chance to read the output (on Visual C++ 2005) Lecture: Introduction to Programming, Slide 44

Hello, world! Hello world is a very important program Its purpose is to help you get used to your tools Compiler Program development environment Program execution environment Type in the program carefully After you get it to work, please make a few mistakes to see how the tools respond; for example Forget the header Forget to terminate the string Misspell return (e.g. retrun) Forget a semicolon ; Forget { or } Typical execution: g++ -o helloworld HelloWorld.cpp./helloWorld Lecture: Introduction to Programming, Slide 45

few usual errors Lecture: Introduction to Programming, Slide 46

Hello world Only cout << "Hello, world!\n" directly does nothing That s normal Most of our code, and most of the systems we use simply exist to make some other code elegant and/or efficient real world non-software analogies abound Boiler plate, that is, notation, libraries, and other support is what makes our code simple, comprehensible, trustworthy, and efficient. Would you rather write 1,000,000 lines of machine code? This implies that we should not just get things done ; we should take great care that things are done elegantly, correctly, and in ways that ease the creation of more/other software: Style Matters! Lecture: Introduction to Programming, Slide 47

Compilation and linking C++ source code Executable program You write C++ source code Source code is (in principle) human readable The compiler translates what you wrote into object code (sometimes called machine code) Object code is simple enough for a computer to understand The linker links your code to system code needed to execute E.g. input/output libraries, operating system code, and windowing code The result is an executable program E.g. a.exe file on windows or an a.out file on Unix C++ compiler linker Object code Library Object code Lecture: Introduction to Programming, Slide 48

So what is programming? Conventional definitions Telling a very fast moron exactly what to do A plan for solving a problem on a computer Specifying the order of a program execution But modern programs often involve millions of lines of code And manipulation of data is central Definition from another domain (academia) A program is an organized and directed accumulation of resources to accomplish specific objectives Good, but no mention of actually doing anything The definition we ll use Specifying the structure and behavior of a program, and testing that the program performs its task correctly and with acceptable performance Never forget to check that it works Software == one or more programs Lecture: Introduction to Programming, Slide 49

Programming Programming is fundamentally simple Just state what the machine is to do So why is programming hard? We want the machine to do complex things And computers are nitpicking, unforgiving, dumb beasts The world is more complex than we d like to believe So we don t always know the implications of what we want Programming is understanding When you can program a task, you understand it When you program, you spend significant time trying to understand the task you want to automate Programming is part practical, part theory If you are just practical, you produce non-scalable unmaintainable hacks If you are just theoretical, you produce toys Lecture: Introduction to Programming, Slide 50

What is programming? Things to remember Set-up a development environment Familiarize yourself with the tools Make sure you all compile/run the HelloWorld.cpp program by next lecture How the compiler and linker work For next time: Read Chapters 1 and 2 from Stroustrup Lecture: Introduction to Programming, Slide 51

Acknowledgements Bjarne Stroustrup Programming -- Principles and Practice Using C++ http://www.stroustrup.com/programming/ Lecture: Introduction to Programming, Slide 52

Thank you!