Lecture 1
Lecture 1
Programming I
Lecture 1:
Admin and Introduction
Software Maintenance
Software Ecosystems
Practical exam 8%
Quizzes 7%
Midterm exam 30%
Attendance & Participation 5%
Final exam 50%
NO LATE
DELIVERABLES!!
• Example:
• Submitting the work of another person as your original work.
• Incorporating others work in your work and not referencing it.
CSCI131– Programming I
Course Outline – Fall 2023
19
اعداد وتجميع :د .ربيع مفتاح العلواني 19
Why do we need programs?
• Humans communicate in a natural language
• Large vocabulary (10 000s words)
• Complex syntax
• Semantic ambiguity
Programming Compiler +
Interpreter
Programming language
Ex: ???
Vocabulary: restricted
Syntax: small and restricted
ربيع مفتاح العلواني. د:اعداد وتجميع Semantic: no ambiguity (almost) 21
Our Choice: C++
• Widely used.
• Widely available.
• Low-level languages
• Machine, assembly
• High-level languages
• C, C++, ADA, COBOL, FORTRAN …
Our approach
• Use C++.
• Develop general programming skills that
are applicable to many languages.
File.cpp File.exe
• Program:
• An algorithm expressed in a programming
language that follows a specific syntax
return 0;
}
MyProgram.cpp
file extension
What will be the output here??
ربيع مفتاح العلواني. د:اعداد وتجميع 29
C++ Program Structure
C++ is case
Hello to C++ sensitive!
ربيع مفتاح العلواني. د:اعداد وتجميع 30
)A Sample C++ Program (1 of 2
• Semantics
• define what a statement means.
• Run-time errors
• A problem can occur during program execution
• Causes the program to terminate abnormally
Syntax error
Run-time error
Logic error day
All of the abovehours?
• Comments
• Indentation
Fix
Compilation
errors
C++ fundamentals