SlideShare a Scribd company logo
1 of 14
Introduction to Computer Science
Computer Programming
Lecture b
This material (Comp 4 Unit 4) was developed by Oregon Health & Science University, funded by the Department
of Health and Human Services, Office of the National Coordinator for Health Information Technology under
Award Number 90WT0001.
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
Computer Programming
Learning Objectives - 1
• Define the purpose of programming
languages (Lecture a)
• Differentiate between the different types of
programming languages and list
commonly used ones (Lecture a)
• Explain the compiling and interpreting
process for computer programs
(Lecture b)
2
Computer Programming
Learning Objectives - 2
• Learn basic programming concepts
including variable declarations,
assignment statements, expressions,
conditional statements and loops
(Lectures c, d)
• Describe advanced programming
concepts including objects and modularity
(Lecture e)
3
Executing Programs
• Computers execute machine code
• Assemblers translate assembly language
into machine code
• Higher-level languages must be
transformed into machine code
4
Compiled Languages - 1
(Graphics used: PD-US. Fitzsimon, 2009; Thomas & Cullen, 2001; mihi, 2010; warszawianka, 2010)
• Program written and stored in a file(s)
• Compiler transforms the program into
machine code
• Machine code is stored in a new file and
can be executed
5
Compiled Languages - 2
• There is a unique compiler for each operating
system
• Every program must be compiled separately
for each operating system on which it will run
• Examples: C, C++, FORTRAN
(Graphics used: PD-US. Fitzsimon, 2009; Thomas & Cullen,
2001; Fitzsimon, 2007; EdibleKarma, 2008; warszawianka, 2010)
6
Interpreted Languages - 1
(Graphics used: Fitzsimon, 2009, PD-
US; warszawianka, 2010, PD-US)
• Interpreted languages are compiled and
executed at the same time
• Each line is compiled to machine code
– If no errors, executes and goes to next line
– If errors, program ends
7
Interpreted Languages - 2
• The interpreter is unique to an operating
system
• Any program can be interpreted and run
on any computer with an interpreter
• Many scripting languages are interpreted
• Examples:
– BASIC, Perl, MUMPS (early version)
8
Hybrid Approach
• Some languages are compiled to virtual
machine code, then interpreted to machine
code
• Combines speed of compiled language
with portability of interpreted language
• Examples:
– Java™, Python
9
Example: Java
(Graphics used: PD-US. Fitzsimon, 2009; Thomas & Cullen,
2001; Fitzsimon, 2007; EdibleKarma, 2008; warszawianka, 2010)
• Java programs are compiled to byte code
• The Java Virtual Machine (JVM) runs the
byte code
– JVM unique to each type of computer
– Byte code is portable
10
Computer Programming
Summary – Lecture b
• Compiling creates machine code from a
program
• Compilers are unique to each computer
architecture
• Interpreted programs are translated as
they execute
• Some languages, for example Java,
implement hybrid approach of compiling
and interpreting
11
Computer Programming
References – 1 – Lecture b
References
Morley, D., & Parker, C.S. (2010). Chapter 13: Program Development and Programming
Languages. In Understanding Computers Today and Tomorrow, 12th Edition introductory.
Boston: Course Technology.
Parsons, J.J., & Oja, D. (2010). Chapter 12: Computer Programming. In New Perspectives on
Computer Concepts 2011: Comprehensive. 13th ed. Boston: Course Technology.
Programming Languages. (2011). In Wikipedia. Retrieved March 17, 2011, from Redirects to:
https://en.wikipedia.org/wiki/Programming_language.
Scripting Languages. (2011). . In Wikipedia. Retrieved March 17, 2011, from
https://en.wikipedia.org/wiki/Scripting_language.
The Java Language: An Overview. (2007, December). Retrieved March 21, 2011, from
http://www.oracle.com/technetwork/java/index.html.
Images
Slides 5-7, 10: Text page icon. [image on the Internet]. Fitzsimon, A. (2009, April 20). Retrieved
November 12, 2011 from https://openclipart.org/detail/25528/text-page-icon. This file has
been released into the Public Domain.
Slides 5-6, 10: Architecture framework. [image on the Internet]. Thomas, R. & Cullen, P. (2001,
April). Retrieved November 12, 2011 from:
http://commons.wikimedia.org/wiki/File:Architecture_framework.jpg. This file has been
released into the Public Domain.
12
Computer Programming
References – 2 – Lecture b
Images, continued
Slides 5-6: Binary File [image on the Internet]. mihi. (2010, April 21). Retrieved November
12, 2011 from: https://openclipart.org/detail/49411/binary-file. This file has been
released to the Public Domain.
Slides 5-6, 10: Computer “tango computer”. [image on the Internet]. Warszawianka.
(2010, March 27). Retrieved November 12, 2011 from:
https://openclipart.org/detail/34531/tango-computer. This file has been released to the
Public Domain.
Slides 6, 10: Apple Logo. [image on the Internet]. EdibleKarma. (2008, February 2007).
Retrieved November 12, 2011 from:
http://wikimediafoundation.org/wiki/File:Light_Apple_Logo_Free.png. This file has
been released to the Public Domain.
Slides 6, 10: Microsoft Windows Logo. [image on the Internet]. Fitzsimon, A. (2007,
November 13). Retrieved November 12, 2011 from: http://www.clker.com/clipart-
7536.html. This file has been released to the Public Domain.
Slide 10: Java Class. [image on the Internet]. Fitzsimon, A. (2009, May 1). Retrieved
November 12, 2011 from: https://openclipart.org/detail/25559/java. This file has been
released to the Public Domain.
13
Introduction to Computer Science
Computer Programming
Lecture b
This material was developed by Oregon
Health & Science University, funded by the
Department of Health and Human Services,
Office of the National Coordinator for Health
Information Technology under Award
Number 90WT0001.
14

More Related Content

What's hot

PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESABHINAV SINGH
 
Programming language
Programming languageProgramming language
Programming languageDhani Ahmad
 
Programming languages
Programming languagesProgramming languages
Programming languagesAsmasum
 
Dot net
Dot netDot net
Dot netpublic
 
History of programming
History of programmingHistory of programming
History of programmingSharwin Calimlim
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 
Programming Languages and the Programming Process
Programming Languages and the Programming ProcessProgramming Languages and the Programming Process
Programming Languages and the Programming ProcessSajib Barua
 
Imperative programming
Imperative programmingImperative programming
Imperative programmingEdward Blurock
 
C Programming Language
C Programming LanguageC Programming Language
C Programming LanguageGitanshu Gitanshu
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharVivek Parihar
 
Evolution of Programming Languages
Evolution of Programming LanguagesEvolution of Programming Languages
Evolution of Programming LanguagesSayanee Basu
 
Programming Languages An Intro
Programming Languages An IntroProgramming Languages An Intro
Programming Languages An IntroKimberly De Guzman
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languageAkhilesh Maithani
 
History of Programming Language
History of Programming LanguageHistory of Programming Language
History of Programming Languagetahria123
 
Introduction to c
Introduction to  cIntroduction to  c
Introduction to cRavinder Kaur
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_languageWay2itech
 
Computer programming programming_langugages
Computer programming programming_langugagesComputer programming programming_langugages
Computer programming programming_langugageseShikshak
 

What's hot (19)

PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGES
 
Programming language
Programming languageProgramming language
Programming language
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Introduction to programing languages part 1
Introduction to programing languages   part 1Introduction to programing languages   part 1
Introduction to programing languages part 1
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
Dot net
Dot netDot net
Dot net
 
History of programming
History of programmingHistory of programming
History of programming
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Programming Languages and the Programming Process
Programming Languages and the Programming ProcessProgramming Languages and the Programming Process
Programming Languages and the Programming Process
 
Imperative programming
Imperative programmingImperative programming
Imperative programming
 
C Programming Language
C Programming LanguageC Programming Language
C Programming Language
 
Programming languages and concepts by vivek parihar
Programming languages and concepts by vivek pariharProgramming languages and concepts by vivek parihar
Programming languages and concepts by vivek parihar
 
Evolution of Programming Languages
Evolution of Programming LanguagesEvolution of Programming Languages
Evolution of Programming Languages
 
Programming Languages An Intro
Programming Languages An IntroProgramming Languages An Intro
Programming Languages An Intro
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
History of Programming Language
History of Programming LanguageHistory of Programming Language
History of Programming Language
 
Introduction to c
Introduction to  cIntroduction to  c
Introduction to c
 
Introduction to c_language
Introduction to c_languageIntroduction to c_language
Introduction to c_language
 
Computer programming programming_langugages
Computer programming programming_langugagesComputer programming programming_langugages
Computer programming programming_langugages
 

Similar to Computer Programming - Lecture B

Similar to Computer Programming - Lecture B (20)

jhtp5_01
jhtp5_01jhtp5_01
jhtp5_01
 
Introduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the WebIntroduction to Computers, the Internet and the Web
Introduction to Computers, the Internet and the Web
 
Unit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptxUnit 1_Evaluation Criteria_session 3.pptx
Unit 1_Evaluation Criteria_session 3.pptx
 
Intro1
Intro1Intro1
Intro1
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
iw3htp4_01-FINAL.ppt
iw3htp4_01-FINAL.pptiw3htp4_01-FINAL.ppt
iw3htp4_01-FINAL.ppt
 
Lecture 10
Lecture 10Lecture 10
Lecture 10
 
C programming part1
C programming part1C programming part1
C programming part1
 
01 intro to vb-net
01 intro to vb-net01 intro to vb-net
01 intro to vb-net
 
c#.pptx
c#.pptxc#.pptx
c#.pptx
 
Asp.net new
Asp.net newAsp.net new
Asp.net new
 
Dion computerprogramming
Dion computerprogrammingDion computerprogramming
Dion computerprogramming
 
Dion computerprogramming
Dion computerprogrammingDion computerprogramming
Dion computerprogramming
 
Evolution and History of Programming Languages - Software/Hardware/System
Evolution and History of Programming Languages - Software/Hardware/SystemEvolution and History of Programming Languages - Software/Hardware/System
Evolution and History of Programming Languages - Software/Hardware/System
 
Net framework
Net frameworkNet framework
Net framework
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
all languages in computer programming
all languages in computer programmingall languages in computer programming
all languages in computer programming
 
Oop lecture1-chapter1(review of java)
Oop lecture1-chapter1(review of java)Oop lecture1-chapter1(review of java)
Oop lecture1-chapter1(review of java)
 
Oop lecture1-chapter1(review of java)
Oop lecture1-chapter1(review of java)Oop lecture1-chapter1(review of java)
Oop lecture1-chapter1(review of java)
 
report
reportreport
report
 

More from CMDLearning

What is Health Informatics - Lecture B
What is Health Informatics - Lecture BWhat is Health Informatics - Lecture B
What is Health Informatics - Lecture BCMDLearning
 
Evolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture DEvolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture DCMDLearning
 
Evolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture CEvolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture CCMDLearning
 
Evolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture BEvolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture BCMDLearning
 
Evolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture AEvolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture ACMDLearning
 
Public Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture CPublic Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture CCMDLearning
 
Public Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture BPublic Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture BCMDLearning
 
Public Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture APublic Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture ACMDLearning
 
Public Health (Part 1) Lecture C
Public Health (Part 1) Lecture CPublic Health (Part 1) Lecture C
Public Health (Part 1) Lecture CCMDLearning
 
Public Health (Part 1) Lecture B
Public Health (Part 1) Lecture BPublic Health (Part 1) Lecture B
Public Health (Part 1) Lecture BCMDLearning
 
Public Health (Part 1) Lecture A
Public Health (Part 1) Lecture APublic Health (Part 1) Lecture A
Public Health (Part 1) Lecture ACMDLearning
 
Regulating Healthcare - Lecture E
Regulating Healthcare - Lecture ERegulating Healthcare - Lecture E
Regulating Healthcare - Lecture ECMDLearning
 
Regulating Healthcare - Lecture D
Regulating Healthcare - Lecture DRegulating Healthcare - Lecture D
Regulating Healthcare - Lecture DCMDLearning
 
Regulating Healthcare - Lecture C
Regulating Healthcare - Lecture CRegulating Healthcare - Lecture C
Regulating Healthcare - Lecture CCMDLearning
 
Regulating Healthcare - Lecture A
Regulating Healthcare - Lecture ARegulating Healthcare - Lecture A
Regulating Healthcare - Lecture ACMDLearning
 
Regulating Healthcare - Lecture B
Regulating Healthcare - Lecture BRegulating Healthcare - Lecture B
Regulating Healthcare - Lecture BCMDLearning
 
Financing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture CFinancing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture CCMDLearning
 
Financing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture BFinancing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture BCMDLearning
 
Financing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture AFinancing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture ACMDLearning
 
Financing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture DFinancing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture DCMDLearning
 

More from CMDLearning (20)

What is Health Informatics - Lecture B
What is Health Informatics - Lecture BWhat is Health Informatics - Lecture B
What is Health Informatics - Lecture B
 
Evolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture DEvolution of and Trends in Health Care - Lecture D
Evolution of and Trends in Health Care - Lecture D
 
Evolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture CEvolution of and Trends in Health Care - Lecture C
Evolution of and Trends in Health Care - Lecture C
 
Evolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture BEvolution of and Trends in Health Care - Lecture B
Evolution of and Trends in Health Care - Lecture B
 
Evolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture AEvolution of and Trends in Health Care - Lecture A
Evolution of and Trends in Health Care - Lecture A
 
Public Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture CPublic Healthcare (Part 2) Lecture C
Public Healthcare (Part 2) Lecture C
 
Public Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture BPublic Healthcare (Part 2) Lecture B
Public Healthcare (Part 2) Lecture B
 
Public Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture APublic Healthcare (Part 2) Lecture A
Public Healthcare (Part 2) Lecture A
 
Public Health (Part 1) Lecture C
Public Health (Part 1) Lecture CPublic Health (Part 1) Lecture C
Public Health (Part 1) Lecture C
 
Public Health (Part 1) Lecture B
Public Health (Part 1) Lecture BPublic Health (Part 1) Lecture B
Public Health (Part 1) Lecture B
 
Public Health (Part 1) Lecture A
Public Health (Part 1) Lecture APublic Health (Part 1) Lecture A
Public Health (Part 1) Lecture A
 
Regulating Healthcare - Lecture E
Regulating Healthcare - Lecture ERegulating Healthcare - Lecture E
Regulating Healthcare - Lecture E
 
Regulating Healthcare - Lecture D
Regulating Healthcare - Lecture DRegulating Healthcare - Lecture D
Regulating Healthcare - Lecture D
 
Regulating Healthcare - Lecture C
Regulating Healthcare - Lecture CRegulating Healthcare - Lecture C
Regulating Healthcare - Lecture C
 
Regulating Healthcare - Lecture A
Regulating Healthcare - Lecture ARegulating Healthcare - Lecture A
Regulating Healthcare - Lecture A
 
Regulating Healthcare - Lecture B
Regulating Healthcare - Lecture BRegulating Healthcare - Lecture B
Regulating Healthcare - Lecture B
 
Financing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture CFinancing Healthcare (Part 2) Lecture C
Financing Healthcare (Part 2) Lecture C
 
Financing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture BFinancing Healthcare (Part 2) Lecture B
Financing Healthcare (Part 2) Lecture B
 
Financing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture AFinancing Healthcare (Part 2) Lecture A
Financing Healthcare (Part 2) Lecture A
 
Financing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture DFinancing Healthcare (Part 2) Lecture D
Financing Healthcare (Part 2) Lecture D
 

Recently uploaded

hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...
hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...
hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...delhimodelshub1
 
Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...delhimodelshub1
 
Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...
Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...
Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...soniya singh
 
Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7
Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7
Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7Miss joya
 
Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...delhimodelshub1
 
Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...
Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...
Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...delhimodelshub1
 
Call Girl Raipur 9873940964 Book Hot And Sexy Girls
Call Girl Raipur 9873940964 Book Hot And Sexy GirlsCall Girl Raipur 9873940964 Book Hot And Sexy Girls
Call Girl Raipur 9873940964 Book Hot And Sexy Girlsddev2574
 
Leading transformational change: inner and outer skills
Leading transformational change: inner and outer skillsLeading transformational change: inner and outer skills
Leading transformational change: inner and outer skillsHelenBevan4
 
Call Girl Gurgaon Saloni 9711199012 Independent Escort Service Gurgaon
Call Girl Gurgaon Saloni 9711199012 Independent Escort Service GurgaonCall Girl Gurgaon Saloni 9711199012 Independent Escort Service Gurgaon
Call Girl Gurgaon Saloni 9711199012 Independent Escort Service GurgaonCall Girls Service Gurgaon
 
Call Girls Secunderabad 7001305949 all area service COD available Any Time
Call Girls Secunderabad 7001305949 all area service COD available Any TimeCall Girls Secunderabad 7001305949 all area service COD available Any Time
Call Girls Secunderabad 7001305949 all area service COD available Any Timedelhimodelshub1
 
No Advance 9053900678 Chandigarh Call Girls , Indian Call Girls For Full Ni...
No Advance 9053900678 Chandigarh  Call Girls , Indian Call Girls  For Full Ni...No Advance 9053900678 Chandigarh  Call Girls , Indian Call Girls  For Full Ni...
No Advance 9053900678 Chandigarh Call Girls , Indian Call Girls For Full Ni...Vip call girls In Chandigarh
 
Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...
Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...
Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...Niamh verma
 
pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...
pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...
pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...Call Girls Noida
 
Call Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service Mohali
Call Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service MohaliCall Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service Mohali
Call Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service MohaliHigh Profile Call Girls Chandigarh Aarushi
 
Hot Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In Ludhiana
Hot  Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In LudhianaHot  Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In Ludhiana
Hot Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In LudhianaRussian Call Girls in Ludhiana
 
Call Girls Hyderabad Krisha 9907093804 Independent Escort Service Hyderabad
Call Girls Hyderabad Krisha 9907093804 Independent Escort Service HyderabadCall Girls Hyderabad Krisha 9907093804 Independent Escort Service Hyderabad
Call Girls Hyderabad Krisha 9907093804 Independent Escort Service Hyderabaddelhimodelshub1
 

Recently uploaded (20)

hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...
hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...
hyderabad call girl.pdfRussian Call Girls in Hyderabad Amrita 9907093804 Inde...
 
Russian Call Girls in Dehradun Komal 🔝 7001305949 🔝 📍 Independent Escort Serv...
Russian Call Girls in Dehradun Komal 🔝 7001305949 🔝 📍 Independent Escort Serv...Russian Call Girls in Dehradun Komal 🔝 7001305949 🔝 📍 Independent Escort Serv...
Russian Call Girls in Dehradun Komal 🔝 7001305949 🔝 📍 Independent Escort Serv...
 
Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Indira 9907093804 Independent Escort Service Hyd...
 
Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...
Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...
Gurgaon iffco chowk 🔝 Call Girls Service 🔝 ( 8264348440 ) unlimited hard sex ...
 
Russian Call Girls South Delhi 9711199171 discount on your booking
Russian Call Girls South Delhi 9711199171 discount on your bookingRussian Call Girls South Delhi 9711199171 discount on your booking
Russian Call Girls South Delhi 9711199171 discount on your booking
 
Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7
Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7
Vip Kolkata Call Girls Cossipore 👉 8250192130 ❣️💯 Available With Room 24×7
 
Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...
Russian Call Girls Hyderabad Saloni 9907093804 Independent Escort Service Hyd...
 
Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...
Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...
Russian Call Girls in Hyderabad Ishita 9907093804 Independent Escort Service ...
 
Call Girl Raipur 9873940964 Book Hot And Sexy Girls
Call Girl Raipur 9873940964 Book Hot And Sexy GirlsCall Girl Raipur 9873940964 Book Hot And Sexy Girls
Call Girl Raipur 9873940964 Book Hot And Sexy Girls
 
Leading transformational change: inner and outer skills
Leading transformational change: inner and outer skillsLeading transformational change: inner and outer skills
Leading transformational change: inner and outer skills
 
Call Girl Gurgaon Saloni 9711199012 Independent Escort Service Gurgaon
Call Girl Gurgaon Saloni 9711199012 Independent Escort Service GurgaonCall Girl Gurgaon Saloni 9711199012 Independent Escort Service Gurgaon
Call Girl Gurgaon Saloni 9711199012 Independent Escort Service Gurgaon
 
Call Girls Secunderabad 7001305949 all area service COD available Any Time
Call Girls Secunderabad 7001305949 all area service COD available Any TimeCall Girls Secunderabad 7001305949 all area service COD available Any Time
Call Girls Secunderabad 7001305949 all area service COD available Any Time
 
No Advance 9053900678 Chandigarh Call Girls , Indian Call Girls For Full Ni...
No Advance 9053900678 Chandigarh  Call Girls , Indian Call Girls  For Full Ni...No Advance 9053900678 Chandigarh  Call Girls , Indian Call Girls  For Full Ni...
No Advance 9053900678 Chandigarh Call Girls , Indian Call Girls For Full Ni...
 
Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...
Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...
Call Girls Service Chandigarh Gori WhatsApp ❤9115573837 VIP Call Girls Chandi...
 
Call Girls in Lucknow Esha 🔝 8923113531 🔝 🎶 Independent Escort Service Lucknow
Call Girls in Lucknow Esha 🔝 8923113531  🔝 🎶 Independent Escort Service LucknowCall Girls in Lucknow Esha 🔝 8923113531  🔝 🎶 Independent Escort Service Lucknow
Call Girls in Lucknow Esha 🔝 8923113531 🔝 🎶 Independent Escort Service Lucknow
 
pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...
pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...
pOOJA sexy Call Girls In Sector 49,9999965857 Young Female Escorts Service In...
 
Call Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service Mohali
Call Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service MohaliCall Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service Mohali
Call Girls in Mohali Surbhi ❤️🍑 9907093804 👄🫦 Independent Escort Service Mohali
 
Hot Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In Ludhiana
Hot  Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In LudhianaHot  Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In Ludhiana
Hot Call Girl In Ludhiana 👅🥵 9053'900678 Call Girls Service In Ludhiana
 
College Call Girls Dehradun Kavya 🔝 7001305949 🔝 📍 Independent Escort Service...
College Call Girls Dehradun Kavya 🔝 7001305949 🔝 📍 Independent Escort Service...College Call Girls Dehradun Kavya 🔝 7001305949 🔝 📍 Independent Escort Service...
College Call Girls Dehradun Kavya 🔝 7001305949 🔝 📍 Independent Escort Service...
 
Call Girls Hyderabad Krisha 9907093804 Independent Escort Service Hyderabad
Call Girls Hyderabad Krisha 9907093804 Independent Escort Service HyderabadCall Girls Hyderabad Krisha 9907093804 Independent Escort Service Hyderabad
Call Girls Hyderabad Krisha 9907093804 Independent Escort Service Hyderabad
 

Computer Programming - Lecture B

  • 1. Introduction to Computer Science Computer Programming Lecture b This material (Comp 4 Unit 4) was developed by Oregon Health & Science University, funded by the Department of Health and Human Services, Office of the National Coordinator for Health Information Technology under Award Number 90WT0001. This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/4.0/.
  • 2. Computer Programming Learning Objectives - 1 • Define the purpose of programming languages (Lecture a) • Differentiate between the different types of programming languages and list commonly used ones (Lecture a) • Explain the compiling and interpreting process for computer programs (Lecture b) 2
  • 3. Computer Programming Learning Objectives - 2 • Learn basic programming concepts including variable declarations, assignment statements, expressions, conditional statements and loops (Lectures c, d) • Describe advanced programming concepts including objects and modularity (Lecture e) 3
  • 4. Executing Programs • Computers execute machine code • Assemblers translate assembly language into machine code • Higher-level languages must be transformed into machine code 4
  • 5. Compiled Languages - 1 (Graphics used: PD-US. Fitzsimon, 2009; Thomas & Cullen, 2001; mihi, 2010; warszawianka, 2010) • Program written and stored in a file(s) • Compiler transforms the program into machine code • Machine code is stored in a new file and can be executed 5
  • 6. Compiled Languages - 2 • There is a unique compiler for each operating system • Every program must be compiled separately for each operating system on which it will run • Examples: C, C++, FORTRAN (Graphics used: PD-US. Fitzsimon, 2009; Thomas & Cullen, 2001; Fitzsimon, 2007; EdibleKarma, 2008; warszawianka, 2010) 6
  • 7. Interpreted Languages - 1 (Graphics used: Fitzsimon, 2009, PD- US; warszawianka, 2010, PD-US) • Interpreted languages are compiled and executed at the same time • Each line is compiled to machine code – If no errors, executes and goes to next line – If errors, program ends 7
  • 8. Interpreted Languages - 2 • The interpreter is unique to an operating system • Any program can be interpreted and run on any computer with an interpreter • Many scripting languages are interpreted • Examples: – BASIC, Perl, MUMPS (early version) 8
  • 9. Hybrid Approach • Some languages are compiled to virtual machine code, then interpreted to machine code • Combines speed of compiled language with portability of interpreted language • Examples: – Java™, Python 9
  • 10. Example: Java (Graphics used: PD-US. Fitzsimon, 2009; Thomas & Cullen, 2001; Fitzsimon, 2007; EdibleKarma, 2008; warszawianka, 2010) • Java programs are compiled to byte code • The Java Virtual Machine (JVM) runs the byte code – JVM unique to each type of computer – Byte code is portable 10
  • 11. Computer Programming Summary – Lecture b • Compiling creates machine code from a program • Compilers are unique to each computer architecture • Interpreted programs are translated as they execute • Some languages, for example Java, implement hybrid approach of compiling and interpreting 11
  • 12. Computer Programming References – 1 – Lecture b References Morley, D., & Parker, C.S. (2010). Chapter 13: Program Development and Programming Languages. In Understanding Computers Today and Tomorrow, 12th Edition introductory. Boston: Course Technology. Parsons, J.J., & Oja, D. (2010). Chapter 12: Computer Programming. In New Perspectives on Computer Concepts 2011: Comprehensive. 13th ed. Boston: Course Technology. Programming Languages. (2011). In Wikipedia. Retrieved March 17, 2011, from Redirects to: https://en.wikipedia.org/wiki/Programming_language. Scripting Languages. (2011). . In Wikipedia. Retrieved March 17, 2011, from https://en.wikipedia.org/wiki/Scripting_language. The Java Language: An Overview. (2007, December). Retrieved March 21, 2011, from http://www.oracle.com/technetwork/java/index.html. Images Slides 5-7, 10: Text page icon. [image on the Internet]. Fitzsimon, A. (2009, April 20). Retrieved November 12, 2011 from https://openclipart.org/detail/25528/text-page-icon. This file has been released into the Public Domain. Slides 5-6, 10: Architecture framework. [image on the Internet]. Thomas, R. & Cullen, P. (2001, April). Retrieved November 12, 2011 from: http://commons.wikimedia.org/wiki/File:Architecture_framework.jpg. This file has been released into the Public Domain. 12
  • 13. Computer Programming References – 2 – Lecture b Images, continued Slides 5-6: Binary File [image on the Internet]. mihi. (2010, April 21). Retrieved November 12, 2011 from: https://openclipart.org/detail/49411/binary-file. This file has been released to the Public Domain. Slides 5-6, 10: Computer “tango computer”. [image on the Internet]. Warszawianka. (2010, March 27). Retrieved November 12, 2011 from: https://openclipart.org/detail/34531/tango-computer. This file has been released to the Public Domain. Slides 6, 10: Apple Logo. [image on the Internet]. EdibleKarma. (2008, February 2007). Retrieved November 12, 2011 from: http://wikimediafoundation.org/wiki/File:Light_Apple_Logo_Free.png. This file has been released to the Public Domain. Slides 6, 10: Microsoft Windows Logo. [image on the Internet]. Fitzsimon, A. (2007, November 13). Retrieved November 12, 2011 from: http://www.clker.com/clipart- 7536.html. This file has been released to the Public Domain. Slide 10: Java Class. [image on the Internet]. Fitzsimon, A. (2009, May 1). Retrieved November 12, 2011 from: https://openclipart.org/detail/25559/java. This file has been released to the Public Domain. 13
  • 14. Introduction to Computer Science Computer Programming Lecture b This material was developed by Oregon Health & Science University, funded by the Department of Health and Human Services, Office of the National Coordinator for Health Information Technology under Award Number 90WT0001. 14

Editor's Notes

  1. Welcome to Introduction to Computer Science: Computer Programming. This is lecture b. The component, Introduction to Computer Science, provides a basic overview of computer architecture; data organization, representation, and structure; structure of programming languages; networking, and data communication. It also includes the basic terminology of computing. 
  2. The learning objectives for this unit, Computer Programming, are to: Define the purpose of programming languages Differentiate between the different types of programming languages and list commonly used ones Explain the compiling and interpreting process for computer programs
  3. Learn basic programming concepts including variable declarations, assignment statements, expressions, conditional statements, and loops And describe advanced programming concepts including objects and modularity
  4. This lecture will focus on the compiling and interpreting process for computer programs. Computers can execute only machine code, which are sequences of ones and zeros. Therefore programs written in any language must be converted to machine code prior to execution. If a program is written in assembly language, which is a low-level language, an assembler is used to translate the assembly language code into machine code. This is relatively straightforward since the translation happens from a computer-specific assembly language to its corresponding machine code. But what about high-level languages that aren't specific to a particular machine? How are they converted to machine code?
  5. The answer is that higher-level languages are compiled. The compiler is a software application that takes as input a program written in a particular programming language - in the case of the image on this slide, C - and outputs machine code that can run on a computer. If there are any syntax errors in the program file, the compiler will flag them and halt compilation. The programmer will need to fix these errors before the compilation will complete. This executable program can be run over and over again without needing to be recompiled…until the next update, of course. When the program is ready for release, its executable version can be distributed.
  6. Compilers are unique to a given operating system, so there are different C compilers for Microsoft Windows, Apple OSX, and Linux. For distribution purposes, the same C program must be compiled multiple times – for each operating system it will be deployed on. Examples of programming languages that must be compiled are C; C++; and FORTRAN, among many others.
  7. There is a slight variation on compiling called interpreting. In this case, programs written in an interpreted language are processed one line or one statement at a time. One line is compiled to machine code and run on the computer. If the compiler finds an error, the program quits with an error message. If not, the statement executes and the next line is compiled and so on. Note that because the interpretation step and the execution steps happen together, these programs tend to run slower than programs that are compiled. The trade-off is that interpreted languages can be faster to develop since the entire application doesn't need to be compiled before running it. During the development stage, program versions are changed frequently, which can result in a lot of compilation time, particularly for a large application.
  8. The interpreter for the language is unique to an operating system, but once the interpreter is installed, it can handle any program written in the corresponding language. In other words, users can port, which means to move or copy over, a program written in an interpreted language to any computer, assuming the computer has the interpreter installed. Many scripting languages are interpreted, making programs written in them portable.   Some examples of interpreted languages are BASIC, Perl, and an early version of the Massachusetts General Hospital Utility Multi-Programming System – or MUMPS.
  9. There is a hybrid approach that combines compilation and interpretation. In this case, programs are compiled to an intermediate type of code that can run on a virtual machine. This virtual machine then interprets the code. As long as a computer has the virtual machine, it can run any code that is compiled to this intermediate state.  A virtual machine is a program that runs as a process on your computer. It tricks the operating system into thinking it is a real, physical computer. This hybrid approach is valuable, since it combines the speed of a compiled language with the portability of an interpreted language. The virtual machine and the intermediate code are both optimized so that they run faster than a simple interpreted language would, yet there is more portability than with a compiled language.   Some examples are Java and Python. The next slide will show in detail how Java is compiled and run.
  10. In the case of Java, programs are compiled to what is called byte code, also called a class file. A Java Virtual Machine, or JVM, runs the byte code. Most computers today have Java installed, it is also called Java SE. Java is often installed or updated when visiting a website that uses Java. Web browsers’ use of Java is what made it so popular – any Java byte code contained within an application can run on any computer with a JVM.
  11. This concludes lecture b of the unit on Computer Programming. In summary, a program written in a high-level language, like C or Java, must be compiled to create machine code. Because machine code is unique to each computer architecture, there must be a unique compiling process for each architecture on which the code is to run. This means that if a user wants a C program to run on different architectures, say a Windows computer and an Apple computer, the program must be compiled separately for each of those architectures. Interpreted programs are translated differently; they use an interpreter, which is unique to each computer architecture, to translate each statement of the program as the program runs. The Java programming language uses a hybrid approach that allows Java programs to be portable. It compiles the Java program into a byte code, which is run by the Java Virtual Machine, or JVM. The JVM is unique to each architecture, but once it is installed, any Java program can be run on that computer. This allows Java programs to be portable; they do not have to be compiled separately for each architecture.
  12. References slide. No audio.
  13. References slide. No audio.
  14. No audio.