KEMBAR78
Lec_01_Intro.ppsx computer and programming | PPSX
COMPUTER AND
PROGRAMMING
Dr. Abdelhady Mostafa
Assiut University – Dept. of Mechatronics Eng.
MET 111 - First semester 2024/2025
Lecture 1
2
Contact Information
■ Lecturer:
- Dr. Abdelhady Mostafa Abdelhady Esmaeel
- Office: 4th floor
- Email: abdelhady@aun.edu.eg
- Office hours: Tuesday, 1-3 pm
■ Teaching Assistants:
- Eng. Ahmed Hisham
3
Today’s menu
■ Ground rules
■ About the course
■ Course contents
■ Why learn C++?
■ How to program?
■ Trivia
4
Ground rules
■ In-class behavior rules
– Starting in time
– 10 min break/hour
– Interaction
– Cell phones
– Be patient
■ Tutorial sessions: guided self-study
■ Active participation is the name of the game!
5
About the course
– Which programming language?
– Intended Learning Outcomes (ILOs)
– Prerequisites
– Connection with other courses
– Material
– Grading system
– Compiler
– Course specification
6
About the course
Which programming language?
– Object-Oriented Programming (OOP) in C++
– C++ is a general-purpose programming language
– Object-oriented and generic programming features
– Facilities for low-level memory manipulation
– Ability to interact with hardware directly
7
About the course
Intended Learning Outcomes (ILOs)
– Knowledge and understanding
 Recognize the basic concepts of C++ programming
 Describe the differences between procedure programming and
OOP
 Describe the benefits of object oriented programming
– Analytical
 Analyze a problem and construct a C++ program that solves it
8
About the course
Intended Learning Outcomes (ILOs)
– Skills
 Design and implement object-oriented applications
 Discover errors in a C++ program and describe how to fix them
 Critique a C++ program and describe ways to improve it
‒ General
 Perform tasks independently and in a team work
 Appreciate the importance of programming in solving problems
9
About the course
Prerequisites
– Basic knowledge on computers and programming
– Programming is like car driving!
10
About the course
Connection with other courses
– This course can be useful for many other courses
– Graduation project
11
About the course
Material
– Text books:
 Object-Oriented Programming in C++, Robert Lafore, 4th ed.
 C++ how to program, P. Deitel & H. Deitel, 8th ed.
– Handouts of slides
– Exercises
12
About the course
Grading system
Year Work Practical
Exam
Final Exam Total
30 20 75 125
Year Work
Quiz (4) 10
In-class activity 5
Year work exams 15
Project -
13
About the course
C++ compiler
■ Code::Blocks
■ Microsoft visual studio C++
■ How to obtain original copy of the compiler:
– E-mail address at the university server (name@aun.edu.eg)
– Register at the Information Network of the university (2nd floor – Eng. Josef)
– Fees: 10 LE
14
Today’s menu
■ Ground rules
■ About the course
■ Course contents
■ Why learn C++?
■ How to program?
■ Trivia
15
Course contents
■ Lecture 1: Introduction
■ Lecture 2: Flow of control (Loops)
■ Lecture 3: Flow of control (Decisions)
■ Lecture 4: Structures
■ Lecture 5: Functions  (Exam 1)
■ Lecture 6: Functions (cont.)
■ Lecture 7: Objects and classes
■ Lecture 8: Objects and classes (cont.)
■ Lecture 9: Arrays and strings
■ Lecture 10: Arrays and strings (cont.)  (Exam 2)
16
Why learn C++?
■ General purpose, powerful, and very efficient language
■ There are billions of lines of code already written in C++. Your
possibilities for code reuse are huge!
■ It is used almost everywhere - PC, Mac, Xbox 360, PS3, cell
phones, embedded
17
Why learn C++?
18
Why learn C++?
19
Why learn C++?
■ C++ Salary++
■ Career opportunities
20
Career opportunities
https://www.payscale.com/career-news/2014/12/what-code-should-you-learn-infographic-
21
Career opportunities
Principal/ Senior Principal Software and
Simulation Engineer - Augmented Visibility
Cairo, Egypt Sun 17 Dec 08:49
• Manual coding of Software components using C
https://valeo.referrals.selectminds.com/jobs/principal-senior-principal-software-and-simulation-
engineer-augmented-visibility-3304
22
Career opportunities
23
Career opportunities
24
Today’s menu
■ Ground rules
■ About the course
■ Course contents
■ Why learn C++?
■ How to program?
■ Trivia
25
How to program?
• Before a program is written, the programmer must clearly
understand what data are to be used, the desired result, and the
procedure used to produce this result.
• The procedure, or solution, selected is referred to as an algorithm.
• In essence, an algorithm answers the question “What method will
you use to solve this problem?”
An algorithm is defined as a step-by-step sequence of
instructions that must terminate and that describe how the
data is to be processed to produce the desired outputs.
26
How to program?
Example
Suppose we want to calculate someone’s gross pay. How the
program should be designed?
1. Display a message on the screen asking “How many hours did you work?”
2. Wait for the user to enter the number of hours worked. Once the user enters a
number, store it in memory.
3. Display a message on the screen asking “How much do you get paid per hour?”
4. Wait for the user to enter an hourly pay rate. Once the user enters a number, store it
in memory.
5. Multiply the number of hours by the amount paid per hour, and store the result in
memory.
6. Display a message on the screen that tells the amount of money earned. The message
must include the result of the calculation performed in Step 5.
27
Exercise
The following pseudocode algorithm has an error. The program is
supposed to ask the user for the length and width of a rectangular
room, and then display the room’s area. The program must multiply
the width by the length in order to determine the area. Find the
error.
area = width * length.
Display “What is the room’s width?”.
Input width.
Display “What is the room’s length?”.
Input length.
Display area.
28
Today’s menu
■ Ground rules
■ About the course
■ Course contents
■ Why learn C++?
■ How to program?
■ Trivia
29
Trivia
Math symbols
Symbol Name
# Hash
* Asterisk (or Star)
: Colon
; Semi-colon
, Comma
< > Angle brackets
( ) Parentheses (or Round brackets)
[ ] Square brackets
{ } Curly brackets (or Braces)
“ ” Double quotation
‘ ’ Single quotation
30
Next Lecture …
Hello World!
31
Questions?

Lec_01_Intro.ppsx computer and programming

  • 1.
    COMPUTER AND PROGRAMMING Dr. AbdelhadyMostafa Assiut University – Dept. of Mechatronics Eng. MET 111 - First semester 2024/2025 Lecture 1
  • 2.
    2 Contact Information ■ Lecturer: -Dr. Abdelhady Mostafa Abdelhady Esmaeel - Office: 4th floor - Email: abdelhady@aun.edu.eg - Office hours: Tuesday, 1-3 pm ■ Teaching Assistants: - Eng. Ahmed Hisham
  • 3.
    3 Today’s menu ■ Groundrules ■ About the course ■ Course contents ■ Why learn C++? ■ How to program? ■ Trivia
  • 4.
    4 Ground rules ■ In-classbehavior rules – Starting in time – 10 min break/hour – Interaction – Cell phones – Be patient ■ Tutorial sessions: guided self-study ■ Active participation is the name of the game!
  • 5.
    5 About the course –Which programming language? – Intended Learning Outcomes (ILOs) – Prerequisites – Connection with other courses – Material – Grading system – Compiler – Course specification
  • 6.
    6 About the course Whichprogramming language? – Object-Oriented Programming (OOP) in C++ – C++ is a general-purpose programming language – Object-oriented and generic programming features – Facilities for low-level memory manipulation – Ability to interact with hardware directly
  • 7.
    7 About the course IntendedLearning Outcomes (ILOs) – Knowledge and understanding  Recognize the basic concepts of C++ programming  Describe the differences between procedure programming and OOP  Describe the benefits of object oriented programming – Analytical  Analyze a problem and construct a C++ program that solves it
  • 8.
    8 About the course IntendedLearning Outcomes (ILOs) – Skills  Design and implement object-oriented applications  Discover errors in a C++ program and describe how to fix them  Critique a C++ program and describe ways to improve it ‒ General  Perform tasks independently and in a team work  Appreciate the importance of programming in solving problems
  • 9.
    9 About the course Prerequisites –Basic knowledge on computers and programming – Programming is like car driving!
  • 10.
    10 About the course Connectionwith other courses – This course can be useful for many other courses – Graduation project
  • 11.
    11 About the course Material –Text books:  Object-Oriented Programming in C++, Robert Lafore, 4th ed.  C++ how to program, P. Deitel & H. Deitel, 8th ed. – Handouts of slides – Exercises
  • 12.
    12 About the course Gradingsystem Year Work Practical Exam Final Exam Total 30 20 75 125 Year Work Quiz (4) 10 In-class activity 5 Year work exams 15 Project -
  • 13.
    13 About the course C++compiler ■ Code::Blocks ■ Microsoft visual studio C++ ■ How to obtain original copy of the compiler: – E-mail address at the university server (name@aun.edu.eg) – Register at the Information Network of the university (2nd floor – Eng. Josef) – Fees: 10 LE
  • 14.
    14 Today’s menu ■ Groundrules ■ About the course ■ Course contents ■ Why learn C++? ■ How to program? ■ Trivia
  • 15.
    15 Course contents ■ Lecture1: Introduction ■ Lecture 2: Flow of control (Loops) ■ Lecture 3: Flow of control (Decisions) ■ Lecture 4: Structures ■ Lecture 5: Functions  (Exam 1) ■ Lecture 6: Functions (cont.) ■ Lecture 7: Objects and classes ■ Lecture 8: Objects and classes (cont.) ■ Lecture 9: Arrays and strings ■ Lecture 10: Arrays and strings (cont.)  (Exam 2)
  • 16.
    16 Why learn C++? ■General purpose, powerful, and very efficient language ■ There are billions of lines of code already written in C++. Your possibilities for code reuse are huge! ■ It is used almost everywhere - PC, Mac, Xbox 360, PS3, cell phones, embedded
  • 17.
  • 18.
  • 19.
    19 Why learn C++? ■C++ Salary++ ■ Career opportunities
  • 20.
  • 21.
    21 Career opportunities Principal/ SeniorPrincipal Software and Simulation Engineer - Augmented Visibility Cairo, Egypt Sun 17 Dec 08:49 • Manual coding of Software components using C https://valeo.referrals.selectminds.com/jobs/principal-senior-principal-software-and-simulation- engineer-augmented-visibility-3304
  • 22.
  • 23.
  • 24.
    24 Today’s menu ■ Groundrules ■ About the course ■ Course contents ■ Why learn C++? ■ How to program? ■ Trivia
  • 25.
    25 How to program? •Before a program is written, the programmer must clearly understand what data are to be used, the desired result, and the procedure used to produce this result. • The procedure, or solution, selected is referred to as an algorithm. • In essence, an algorithm answers the question “What method will you use to solve this problem?” An algorithm is defined as a step-by-step sequence of instructions that must terminate and that describe how the data is to be processed to produce the desired outputs.
  • 26.
    26 How to program? Example Supposewe want to calculate someone’s gross pay. How the program should be designed? 1. Display a message on the screen asking “How many hours did you work?” 2. Wait for the user to enter the number of hours worked. Once the user enters a number, store it in memory. 3. Display a message on the screen asking “How much do you get paid per hour?” 4. Wait for the user to enter an hourly pay rate. Once the user enters a number, store it in memory. 5. Multiply the number of hours by the amount paid per hour, and store the result in memory. 6. Display a message on the screen that tells the amount of money earned. The message must include the result of the calculation performed in Step 5.
  • 27.
    27 Exercise The following pseudocodealgorithm has an error. The program is supposed to ask the user for the length and width of a rectangular room, and then display the room’s area. The program must multiply the width by the length in order to determine the area. Find the error. area = width * length. Display “What is the room’s width?”. Input width. Display “What is the room’s length?”. Input length. Display area.
  • 28.
    28 Today’s menu ■ Groundrules ■ About the course ■ Course contents ■ Why learn C++? ■ How to program? ■ Trivia
  • 29.
    29 Trivia Math symbols Symbol Name #Hash * Asterisk (or Star) : Colon ; Semi-colon , Comma < > Angle brackets ( ) Parentheses (or Round brackets) [ ] Square brackets { } Curly brackets (or Braces) “ ” Double quotation ‘ ’ Single quotation
  • 30.
  • 31.

Editor's Notes

  • #9 4 ways learning to drive a car is like learning to code It gives you independence. Before I always had to ask my mom or my husband to drive if I needed to use a car, now I can do it myself. For coding tasks, you may depend on a lab mate or software like SPSS or SAS, but it’s just nicer if you can do it yourself. It is not about being the best driver or the best coder. I can drive, but I will never be the best driver in any group of people. But who cares? I get from A to B safely and that’s what matters. For coding, it’s the same thing. If you want to use coding in your studies or work, you don’t need to be the best coder. You just need to get from A to B (or from raw data to a nice plot). Practice is key. When I first got my license, I didn’t have access to a car and I didn’t drive for a few years. Clearly, that was not very good for my driving skills or confidence. Later, when I did have a car available, I would regularly take it to drive to a friend who lived just 5 miles away to have a coffee. These short trips helped me feel comfortable in the car. If you’ve learned some coding skills, try to find a way to keep using it, even if it is just for short 5-mile drives. It opens up jobs and opportunities. For many jobs, you need to be able to drive a car. Not just jobs such as taxi driver, but also jobs that are utterly unrelated to driving. For me, I got the job at SFSU when I lived in Menlo Park. Public transport from Menlo Park to SFSU is so bad, that I really couldn’t do the job if I wasn’t able to drive to the SFSU campus. With coding it can be the same thing. I am a biologist and I am interested in evolution of viruses and bacteria – yet I couldn’t do that research without coding skills. Happy coding!