Course Contents PART I INTRODUCTION TO COMPUTER Essential

  • Slides: 26
Download presentation
Course Contents PART I : INTRODUCTION TO COMPUTER § Essential Basic Concepts. § Data

Course Contents PART I : INTRODUCTION TO COMPUTER § Essential Basic Concepts. § Data Representation Inside Computer. § Computer System Components. § Computer Classes. § Computer Networks & Internet. § Computer Applications. § Computer Generations. Computers & Programming (CSE 102) 1

Computer Networks

Computer Networks

Computer Networks l l Two or more computers connected to exchange data Networks facilitate

Computer Networks l l Two or more computers connected to exchange data Networks facilitate the exchange of data very far and very fast Dr. Magdy A. Ahmed - Dr. Yousry Taha Computers & Programming (CSE 102) 3

Network applications l Commercial l Military Entertainment Interactive exchange of data, voice, and video

Network applications l Commercial l Military Entertainment Interactive exchange of data, voice, and video l l • Bank, travel agency, e-commerce Dr. Magdy A. Ahmed - Dr. Yousry Taha Computers & Programming (CSE 102) 4

Categories of Network l Local Area Network (LAN) l Metropolitan Area Network (MAN) •

Categories of Network l Local Area Network (LAN) l Metropolitan Area Network (MAN) • Connect computers within small area (1 km) • Connect computers within medium area (about 10 km) l Wide Area Network (WAN) • Connect computers within vast area Dr. Magdy A. Ahmed - Dr. Yousry Taha Computers & Programming (CSE 102) 5

Why we use computer Networks? l l l Access data and applications in remote

Why we use computer Networks? l l l Access data and applications in remote computers Resources Sharing Reliability Scalability Providing services (E-Mail) - (Chatting) (Video Conferencing) - (Social Networking) Dr. Magdy A. Ahmed - Dr. Yousry Taha Computers & Programming (CSE 102) 6

Communication Elements l Sender l Receiver l Message l Communication channel • Direct link

Communication Elements l Sender l Receiver l Message l Communication channel • Direct link • Switching nodes Dr. Magdy A. Ahmed - Dr. Yousry Taha Computers & Programming (CSE 102) 7

Data Transmission media Wireless Dr. Magdy A. Ahmed - Dr. Yousry Taha Wired Computers

Data Transmission media Wireless Dr. Magdy A. Ahmed - Dr. Yousry Taha Wired Computers & Programming (CSE 102) 8

Internet l History • 1969 - 4 connected devices (ARPANET) • 1972 – 72

Internet l History • 1969 - 4 connected devices (ARPANET) • 1972 – 72 connected devices • 1982– 254 connected devices • Now it has millions of devices world wide and called “Internet” l Services • Social Networking • Web Searching • Electronic Mail or E-mail • File Transfer Protocol (FTP) • Telnet (remote login) Computers & Programming (CSE 102) 9

Program Development and Programming Languages

Program Development and Programming Languages

Software Development Life Cycle (SDLC) l l To have a well defined approach to

Software Development Life Cycle (SDLC) l l To have a well defined approach to develop and maintain software Software Development Life Cycle (SDLC) is: 1 -Problem Analysis 5 -Program Maintenance 2 -Program Design 4 -Program Debugging and Testing Dr. Magdy A. Ahmed - Dr. Yousry Taha 3 -Program Coding Computers & Programming (CSE 102) 11

SDLC : 1 - Problem Analysis l Define and understand the problem • Inputs

SDLC : 1 - Problem Analysis l Define and understand the problem • Inputs • Outputs • User requirements • System requirements • Project schedule • Start thinking in Input Requirements Schedule programming tools Dr. Magdy A. Ahmed - Dr. Yousry Taha Computers & Programming (CSE 102) Output SW tools 12

SDLC: 2 - Program Design l Designers suggest how to solve the problem •

SDLC: 2 - Program Design l Designers suggest how to solve the problem • Algorithm Sequence of deterministic steps to solve the problem • • Pseudocode • Represent the solution in a form like the high level language • It is free from the technical details • It is easy to convert it to high level language program Flowchart • It represents the algorithm by standard symbols Computers & Programming (CSE 102) 13

Pseudocode vs Flowchart l Convert a length in meter to length in centimeter Start

Pseudocode vs Flowchart l Convert a length in meter to length in centimeter Start Read length in meter Length in cm = 100 * length in m Write length in centimetre Pseudocode • • • Read length in meter Multiply length by 100 Write length to represent its value in centimetre End Computers & Programming (CSE 102) 14

SDLC: 3 - Program Coding To convert the algorithm to a program using a

SDLC: 3 - Program Coding To convert the algorithm to a program using a programming language SDLC: 4 - Program Debugging and Testing • To ensure the program is bug free and execute correctly • Debugging • • To check that the code has no: • Compile-Time Errors • Run-Time Errors • Logical Errors (the hardest) Testing • To test the program using designed test data • We should test all scenarios and all possible cases Computers & Programming (CSE 102) 15

SDLC: 5 - Program Maintenance l It starts after using the program • •

SDLC: 5 - Program Maintenance l It starts after using the program • • To fix bugs discovered in real environment To satisfy new user requirements To satisfy new changes in the problem To adapt with new technology in SW and Computing environment l Documentation • • All development steps should be documented It helps programmers and review and improve their systems Computers & Programming (CSE 102) 16

Flowcharts l l l One of the common method to design algorithm Standard symbols

Flowcharts l l l One of the common method to design algorithm Standard symbols are used for representation Symbols are connected by Flow lines Computers & Programming (CSE 102) 17

Basic symbols of Flowchart start end Computational Step (process) Z=X+Y Input / Output Input

Basic symbols of Flowchart start end Computational Step (process) Z=X+Y Input / Output Input X Decision Making X>Y Predefined Process Abs(x) 1 Terminal 2 Connector Computers & Programming (CSE 102) 18

Flowcharts Control Structures l All algorithms could be built using: Read length in meter

Flowcharts Control Structures l All algorithms could be built using: Read length in meter • Sequential structure . . Length in cm = 100 * length in m • Conditional structure • Looping structure Computers & Programming (CSE 102) 19

Examples l Write a program to ask the user for the width and length

Examples l Write a program to ask the user for the width and length of a piece of land then tell him how many orange trees he can grow on it. Given that each orange tree requires 4 m 2. 20

Examples l Write a program to ask the user for the radius of a

Examples l Write a program to ask the user for the radius of a circle, and then display its area and circumference. 21

Flowcharts Control Structures �All algorithms could be built using: ◦ Sequential structure T T

Flowcharts Control Structures �All algorithms could be built using: ◦ Sequential structure T T F ◦ Conditional structure ◦ Looping structure F T F F T T F Computers & Programming (CSE 102) 22

Example l Write a program to ask a student for his grades in 3

Example l Write a program to ask a student for his grades in 3 exams ( each out of 50 ) , get their total and inform the student whether he passed or failed the course.

Flowcharts Control Structures �All algorithms could be built using: For I=1 to 10 ◦

Flowcharts Control Structures �All algorithms could be built using: For I=1 to 10 ◦ Sequential structure ◦ Conditional structure ◦ Looping structure T T F Next I F Computers & Programming (CSE 102) 24

Example l l Assume you put 1000 pounds in a projects that returns a

Example l l Assume you put 1000 pounds in a projects that returns a profit of about 5% per year. How long will it take for your money to double ? Assume you put 5000 pounds in a projects that returns a profit of about 10% per year. How much money will you have in 5 years ?

Example: Start l Design an algorithm to print out the sum of all numbers

Example: Start l Design an algorithm to print out the sum of all numbers between A and B and divisible by 5 (where A is a multiple of 5) Input A, B X=A SUM=0 No X<=B Yes SUM=SUM+X Print SUM X=X+5 End Computers & Programming (CSE 102) 26