0% found this document useful (0 votes)
3 views10 pages

Lecture 01 Introduction

The document outlines the CS 224 Computer Programming course, covering topics such as computer languages, programming rules, and applications in marine calculations. It details computer components, the definition of programs and software, and the use of flowcharts for problem-solving. Additionally, it provides a structured approach to writing a program, including analysis, design, implementation, and testing.

Uploaded by

ziadfathalla333
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views10 pages

Lecture 01 Introduction

The document outlines the CS 224 Computer Programming course, covering topics such as computer languages, programming rules, and applications in marine calculations. It details computer components, the definition of programs and software, and the use of flowcharts for problem-solving. Additionally, it provides a structured approach to writing a program, including analysis, design, implementation, and testing.

Uploaded by

ziadfathalla333
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

CS 224 Computer Programming

Introduction

1
Course Contents
• Introduction to computer languages.

• Details and rules of a scientific programming


language

• Applications to marine and naval calculations.

2
Today
• The Computer
• Computer components
• Programs
• Writing a program
• Flow Charts

3
The Computer Computer Components
• is a tool • Central Processing Unit (CPU)
– the computer brain and main
worker
• varies in size, shape, speed,
capacity, and usage
• Memory
– where the computer stores the
• fast needed information

• Input devices
• does only what it is instructed
– devices to receive input from
to do user (e.g., keyboard, mouse)

• Output devices
– show results to the user (e.g.,
monitor, printer)

4
Programs
• Program
– A solution to a given problem written in a
computer programming language

• Software
– The collection of programs that run in a computer
and determine the operations that are valid in the
computer

5
Flow Charts
A flowchart is a type of diagram that represents an algorithm or process,
showing the steps as boxes of various kinds, and their order by connecting
these with arrows. This diagrammatic representation can give a step-by-
step solution to a given problem. Process operations are represented in
these boxes, and arrows connecting them represent flow of
control. Flowcharts are used in analyzing, designing, documenting or
managing a process or program in various fields.

• The two most common types of boxes in a flowchart are:


– a processing step, usually called activity, and denoted as a rectangular
box
– a decision, usually denoted as a diamond.

6
• Unconditional transfer

• Input or output

• Processing

• Conditional transfer

• Loops ( conditional or
counted)

7
Writing a Program
1. Analysis
Understand the problem). Analyse the problem and break it into smaller
pieces

2. Design
Write step by step solution

3. Implementation
Write the code (the actual program in a computer language)

4. Testing
Test that the program and see if it works
Fix the errors that you discover during testing

8
Home Flow Chart Exercises
Draw a flow chart for each of the flowing procedures:

• Solving a quadratic equation


• Calculating the average of 2 numbers
• Finding the maximum of a set of numbers
• Finding the minimum of a set of numbers
• Finding the positive numbers and their positions
• Finding the negative numbers and their positions

9
10

You might also like