Object Oriented Programming (FIT-II) J. H. Wang Feb. 24, 2014.

Slides:



Advertisements
Similar presentations
COP3330 Object Oriented Programming in C++ Syllabus
Advertisements

Cpt S 122 – Data Structures Course Introduction
6/10/2015Assoc. Prof. Stoyan Bonev1 Assoc. Prof. Stoyan Bonev, PhD Computer Science dept American University in Bulgaria
CSC 171 – FALL 2004 COMPUTER PROGRAMMING LECTURE 0 ADMINISTRATION.
ICE1341 Programming Languages Spring 2005 Lecture #3 Lecture #3 In-Young Ko iko.AT. icu.ac.kr iko.AT. icu.ac.kr Information and Communications University.
COP4020/CGS5426 Programming languages Syllabus. Instructor Xin Yuan Office: 168 LOV Office hours: T, H 10:00am – 11:30am Class website:
Computer Science 102 Data Structures and Algorithms V Fall 2009 Lecture 1: administrative details Professor: Evan Korth New York University 1.
COMP 151: Computer Programming II Spring Course Topics Review of Java and basics of software engineering (3 classes. Chapters 1 and 2) Recursion.
Introduction to Operating Systems J. H. Wang Sep. 18, 2012.
Object-Oriented Programming Dr. Napoleon H. Reyes, Ph.D. Computer Science Institute of Information and Mathematical Sciences Rm QA, IIMS, Albany.
Data Structures, Algorithms, and Generic Programming Course Introduction Zhenhai Duan COP 4530/CGS 5425.
Welcome to CS 3331, Advanced Object-Oriented Programming Fall 2009 Dept. of Computer Science University of Texas at El Paso.
COMP Introduction to Programming Yi Hong May 13, 2015.
Introduction to Information Security J. H. Wang Sep. 15, 2014.
Introduction to Network Security J. H. Wang Feb. 24, 2011.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang.
Object Oriented Programming (FIT-II) J. H. Wang Mar. 5, 2015.
Introduction to Discrete Mathematics J. H. Wang Sep. 14, 2010.
Introduction to Operating Systems J. H. Wang Sep. 18, 2015.
Data Structures, Algorithms, and Generic Programming Breno de Medeiros COP 4530 / CGS 5425 (Fall 2006)
ICS 102 Computer Programming University of Hail College of Computer Science & Engineering Computer Science and Software Engineering Department.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
Selected Topics in Information Technology Programming Language - JAVA Semester 1/2554.
CS 23021–600 Computer Science I Dr. Angela Guercio Spring 2010.
CS 140 Computer Programming (I) Second semester (3 credits) Imam Mohammad bin Saud Islamic University College of Computer Science and Information.
Bilgisayar Mühendisliği Bölümü CENG 102 – Computer Programming Melek OKTAY Syllabus Administrative Information.
Course Introduction Object-oriented Programming. 2 Course information Credit points: 3 Lectures: 15x2 hours; Lab: 15 sections Lecturer:  Trần Thị Minh.
COMP2012 Object-Oriented Programming and Data Structures Fall 2015.
CSE-321 Programming Languages Overview POSTECH March 3, 2009 박성우.
Introduction to Information Security J. H. Wang Sep. 10, 2013.
E81 CSE 532S: Advanced Multi-Paradigm Software Development Chris Gill Department of Computer Science and Engineering Washington University in St. Louis.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang.
Object Oriented Programming (FIT-II) J. H. Wang Feb. 20, 2009.
Introduction to ECE 2401 Data Structure Fall 2005 Chapter 0 Chen, Chang-Sheng
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview Bong-Soo Sohn Assistant Professor School of Computer Science and Engineering Chung-Ang.
Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel CO 204 Object Oriented Programming 2003 Trent University Kate Gregory.
Introduction to Operating Systems J. H. Wang Sep. 15, 2010.
Introduction to Computer Programming (FIT-I pro) J. H. Wang Sep. 17, 2007.
Object Oriented Programming (FIT-II) J. H. Wang Feb. 21, 2012.
Introduction to Information Security J. H. Wang Sep. 18, 2012.
Course Overview for Compilers J. H. Wang Sep. 14, 2015.
Object Oriented Programming (FIT-II) J. H. Wang Jan. 31, 2008.
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2001 Sections Ms. Susan Mitchell.
Course Overview for Compilers J. H. Wang Sep. 20, 2011.
C Programming Lecture 1 : Introduction Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang University.
Introduction to Operating Systems J. H. Wang Sep. 13, 2013.
Course 150 Basic Computing Environment. Objective of course Familiar with Linux environment Objective of lecture: To understand basic terms like software,
MAT 279 Data Communication and the Internet Prof. Shamik Sengupta Office 4210 N Fall 2010.
Course Overview: Linear Algebra
Course Overview Stephen M. Thebaut, Ph.D. University of Florida Software Engineering.
Scott C. Johnson Lecturer Rochester Institute of Technology Spring 2016.
Computer Programming (ECE 201) Instructor : Dr. Soltan Alharbi September Slides borrowed from Instructor: Wajih Alouini.
CS140 – Computer Programming 1 Course Overview First Semester – Fall /1438 – 2016/2017 CS140 - Computer Programming 11.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview
Introduction to Operating Systems
Andy Wang Object Oriented Programming in C++ COP 3330
Computer Engineering Department Islamic University of Gaza
CS101 Computer Programming I
Introduction to programming languages, Algorithms & flowcharts
CSc 020: Programming Concepts and Methodology II
Introduction to programming languages, Algorithms & flowcharts
Computer Programming (ECE 201)
CSC215 Lecture Orientation.
Object Oriented Programming (OOP) Design Lecture 1 : Course Overview
Introduction to programming languages, Algorithms & flowcharts
Andy Wang Object Oriented Programming in C++ COP 3330
Computer Programming (ECE 201)
Computer Engineering Department Islamic University of Gaza
Computer Engineering Department Islamic University of Gaza
Presentation transcript:

Object Oriented Programming (FIT-II) J. H. Wang Feb. 24, 2014

Instructor & TA Instructor –J. H. Wang ( 王正豪 ) –Associate Professor, CSIE, NTUT –Office: R1534, Technology Building – –Tel: ext –Office Hour: 9:00-12:00 am, every Tuesday and Thursday TA –Miss Liu (at R1424, Technology Building) Available time: 13:00-15:00pm, every Monday, Tuesday, or Friday

Course Overview Course: Object Oriented Programming (FIT-II) Time: 9:10-12:00am, Monday Place: R413, Network Center Textbook: Absolute C++, 5th edition, by Walter Savitch and Kenrick Mock, Addison-Wesley, ( 開發 ) –The 3 rd or 4 th edition is also acceptable (with minor changes) References: –A good blog for OOP, by Prof. Y. C. Cheng (in Chinese)A good blog for OOP –C++ Primer, 5th edition, by Stanley B. Lippman, Josee Lajoie, and Barbara E. Moo, Addison-Wesley, –C++ How to Program, 8th edition, by Harvey Deitel and Paul Deitel, Prentice Hall, –The C++ Programming Language, 3 rd edition, by Bjarne Stroustrup, Addison-Wesley, Prerequisites: –Basic computer skills (FIT-I basic) –Working knowledge of high-level programming languages such as C (FIT-I pro)

Target Students For those who –Might NOT major in CSIE but are interested in programming techniques, and –Have accomplished the courses in software engineering track: FIT-I basic & FIT-I pro, and –Are willing to prepare for intermediate and advanced software engineering courses

Emphases of Teaching Basic concepts of the object-oriented programming paradigm Hands-on experience of C++ programming skills Introduction to problem solving techniques, basic data structures and algorithm design

Teaching Lectures Quiz –About 2 quizzes –During the first month Homework and program assignments –About 5 assignments –Homework should be turned in within two weeks Mid-term and final exam

(Tentative) Grading Policy Homework and program assignments: ~40% Quiz: ~10-15% Midterm: ~20-25% Final exam: ~25%

Goal Introducing object-oriented programming concepts –Fundamental constructs in OOP with C++ –Practicing programming skills –Basic concepts: encapsulation, polymorphism, … Preparing for advanced courses –Application software design & object-oriented problem solving –Software engineering & project management

Tentative Schedule Organization of the textbook –Review of computer programming (3-4 wks) Overview of Object Oriented Programming Ch. 1-5: programs, functions, parameters, flow of control, arrays, structures –OOP (focus) (10-12 wks) Ch. 6-8: classes, constructors, friends, references Ch. 9, 10, 12: More constructs: strings, pointers and dynamic arrays, streams and file I/O Ch.14: Inheritance Ch.15: Polymorphism –Generic programming (optional) (2 wks) Ch. 16: templates Ch. 17: Standard Template Library

Tentative Schedule (Cont’) Schedule –Basically, 1 or 2 weeks per chapter The tentative schedule is subject to changes based on the learning status –Course Web Page: Please check the latest announcements, homeworks, exams, …

Program Development Environment Free C++ Development Environments –GCC on Linux/UNIX servers (ntut.edu.tw) Not friendly for beginners –Windows-based Dev C++ ( not maintainedhttp:// –For further development, please check Orwell’s Engine ( ) –Other choices: wxDev-C++ by Colin Laplace et. al. Cygwin ( UNIX-like emulation on Windowshttp:// MinGW ( Commercial tools –Microsoft Visual C++ –Borland C++ –…

Homework Submission Online submission instructions –Programs and homeworks in electronic files must be submitted to the TA online at: Submission site: (TBD) –Before submission: User name: Your student ID Please change your default password at your first login If the submission website fails, the NTUT Network Campus might be used for homework submission

Programming Paradigms Low-level vs. high-level programming languages – relative –Machine vs. human Styles of computer programming –Procedural programming –Object-oriented programming –Functional programming –Logic programming –…

Low-level vs. High-level Programming Languages Low-level: –Machine code –Assembly High-level: (abstraction from the computer details) –Basic, C, Java, Pascal, C++, Perl, Python, …

Styles of Computer Programming Procedural programming –Imperative: procedures, routines, subroutines, methods, or functions Object-oriented programming Functional programming –Mathematical functions –E.g. Lisp, Erlang, Haskell, … Logic programming –Logic: facts, rules –E.g. Prolog …

Examples (1/5) Fibonacci numbers –F n = F n-1 + F n-2, n>=2 F 0 = 0, F 1 = 1 How to program? –(The following examples are adapted from Wikipedia.)

Examples (2/5) Functional: (Haskell) –fib 0 = 0 fib 1 = 1 fib n = fib (n-1) + fib (n-2) –Or fib first second = first : fib second (first+second) fibonacci = fib 0 1 main = print (fibonacci !! 10)

Examples (3/5) Procedural: (C) –int fib(int n) { int first = 0, second = 1; for (int i=0, i<n; i++) { int sum = first+second; first = second; second = sum; } return first; }

Examples (4/5) Assembly: (in x86 using MASM syntax) –mov edx, [esp+8] cmp edx, 0 mov eax, 0 ret cmp edx, 2 mov eax, 1 ret push ebx mov ebx, 1 mov ecx, 1 lea eax, [ebx+ecx] cmp edx, 3 mov ebx, ecx mov ecx, eax dec edx pop ebx ret

Examples (5/5) Machine code: (a function in 32-bit x86) –8B FA B C383 FA B C353BB B D FA BD98B C84AEBF1 5BC3

OOP: Basic Concepts Encapsulation –Object Instance of class –Members Attributes Methods Abstraction –Composition E.g.: car –Inheritance E.g.: Lassie the Dog, a Collie Polymorphism –Many meanings for one function

OOP: Why C++? OO programming language: Why C++? –C++: general purpose programming language with a bias towards systems programming that [from Bjarne Stroustrup’s homepage] Is a better C Supports data abstraction, object-oriented programming, and generic programming –C++ has Many users Wide applications –Others: Smalltalk, Java, …

Some Comparisons Three parts in C++ –Low-level language: largely inherited from C Data types, flow of control, functions, arrays, pointers, … –Advanced language features: to define our own data types (major difference) Class, inheritance, polymorphism, template, exception, … –Standard library: some useful data structures and algorithms Containers, iterators, …

Differences among some textbooks –C++ How to Program: “early objects” approach “late objects” approach also available –C++ Primer: “early objects”, covering basics and library together –Absolute C++: intermediate –The C++ Programming Language: “The Bible”, as a reference

How to Prepare Yourself? Practice, practice, practice… –Exercises on textbooks and reference books –Online resources: programming exercises, forums, … –Programming contests ACM ICPC (International Collegiate Programming Contest) IOI (International Olympiad in Informatics) Domestic: e-tutor, … …

Thanks for Your Attention!