1 / 21

Introduction

Programming. COMP104: Fundamentals and Methodology. Introduction. Objectives. How to solve a problem (by computer) fundamental problem solving techniques How to design an algorithm algorithm design How to write a program in C++ implementation. Course description. Introduction

Télécharger la présentation

Introduction

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming COMP104: Fundamentals and Methodology Introduction

  2. Objectives • How to solve a problem (by computer) fundamental problem solving techniques • How to design an algorithm algorithm design • How to write a program in C++ implementation

  3. Course description • Introduction • C++ basics for Structured (or procedural) Programming • Sequential (assignments) • Branching (if statement) • Looping (while-do statement) • Arrays and algorithms • Functions (local/global, value/ref), recursion • Files • Pointers and dynamic objects • Linked lists • Introduction to OOP (Object Oriented Programming) • Classes, objects • Abstract data types static mid-term dynamic

  4. What can you do after this course? • Program the computer in applications such as the following: • Program a simple calculator • Program simple computer games • Program a simple text editor • Program a small inventory system for a small company • … • You will be ready to take on part-time programming jobs during Xmas break!

  5. Course organization No any prerequisite for comp104! • Lectures (3 h) (office 3506, quan@cse.ust.hk) • Tutorials (1 h) • Not compulsary • Labs (2 h) • Compulsary! See lab policy. • Assignments (homework, 3 projects) But it’s a prerequisite for most of CS courses! Textbook: Programming in C++: Lessons and Applications, by Timothy B. D’Orazio

  6. A typical weekly schedule • Tu Thur Lectures • Sat. Next lab posted on web • Mon-Fri Lab session (students encouraged to demo program by end of lab) • Sat. midnight Deadline for lab by CASS • Course webpage: course.cse.ust.hk/comp104/Password_Only • Print out ‘ppt’ with ‘handouts’ option!!! • Newsgroup, Facebook? • Eclipse tutorial • SVG tutorial

  7. Grading Mark weighting • Labs (10%) • Assignments (25%) • Midterm exam (25%), 6th week, • 9th October, Sat. 1-3pm • Final exam (40%), Dec.

  8. Introduction to Computer Systems • Hardware • Software

  9. Hardware

  10. CPU - central processing unit • Makes decisions, performs computations, and delegates input/output requests • Memory: Stores information • Main memory: RAM, e.g. 256 MB RAM • Secondary memory: hard disk, e.g. 20GB • Input devices • Gets information from the user to the computer • Output devices • Sends information from computer to the user

  11. Work Work Computer Worker Product Product Program Instructions What is a program? A computer program performs a specific task, and may interact with the user and the computer hardware. • Human work model: • Computer work model: A program is a set of instructions

  12. What is a (programming) language? A sequence of instructions • A program needs to be written in a language • There are many programming languages • Low-level, understandable by a computer • High-level, needs a translator! • C++ is a high level programming language A program (in computer language) An algorthm (in human language)

  13. An example: Machine binary language Low-level assembly High-level

  14. Levels of programming language • Machine binary language: unintelligible • Low-level assembly language • Mnemonic names for machine operations • Explicit manipulation of memory addresses • Machine-dependent • High-level language • Readable • Machine-independent

  15. How to translate? A program written in high-level programming language (for example, C++ program) Examples of compilers: • Microsoft Visual C++, Eclipse, g++ COMPILER (for example, Visual C++) A low-level (machine language) program that is understandable by a computer (for example, a PC)

  16. What is a software? The set of all programs or a set of programs • Application software • Programs designed to perform specific tasks and are easy to use • System software • Programs that support the execution and development of other programs Two major types • Operating systems • Translation systems (compilers & linkers)

  17. Common application software: • Microsoft Word, WordPerfect • PowerPoint • Netscape, IE • PhotoShop, Photo-Paint • Quick Time • Operating System (OS) • Windows (DOS, NT, XP, …), Unix (Linux, Solaris, …)

  18. We teach C++, Why? • C++ is one of the most popular languages  • C++ (originally C) • Basic, Pascal, Java, Perl, Cobol, Scheme, Lisp, Smalltalk, Ada, … • C++ is portable (runs on PC, Machintosh, Unix, Mainframes …) • C++ is widely used in industries (almost by everyone)  • C++ is not easy to learn  • The most common versions of C++: • Microsoft Visual C++ • Eclipse • g++ (for Unix machines) C++ C

  19. Programming or Software Development • Editing (to write the program) • Compiling (creates .obj file) • Linking with compiled files (creates .exe file) • Object files • Library modules • Loading and executing • Testing the program debug

  20. Integrated Development Environments (IDE) Combine all of the capabilities that a programmer would want while developing software (VC++, Eclipse) • Editor • Compiler • Linker • Loader • Debugger • Viewer builder

  21. Summary 

More Related