0% found this document useful (0 votes)
182 views

Csc402:Programming I: Chapter 1: Introduction

This document provides an overview of CSC402 Programming I. It discusses the course chapters and timeline, with Chapter 1 being introduced in Week 6 and Chapter 5 concluding in Week 10. It then reviews basic computer and programming concepts like the first and second generation programming languages. The rest of the document defines key programming terms like programs, programming languages, compilation process, and program development life cycle. It includes examples of a C++ program and flowcharts. Activities are provided for students to draw flowcharts and write pseudocode to solve problems related to calculating petrol costs, converting ages to days, and finding the average, minimum and maximum of 5 numbers.

Uploaded by

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

Csc402:Programming I: Chapter 1: Introduction

This document provides an overview of CSC402 Programming I. It discusses the course chapters and timeline, with Chapter 1 being introduced in Week 6 and Chapter 5 concluding in Week 10. It then reviews basic computer and programming concepts like the first and second generation programming languages. The rest of the document defines key programming terms like programs, programming languages, compilation process, and program development life cycle. It includes examples of a C++ program and flowcharts. Activities are provided for students to draw flowcharts and write pseudocode to solve problems related to calculating petrol costs, converting ages to days, and finding the average, minimum and maximum of 5 numbers.

Uploaded by

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

CSC402:PROGRAMMING I

CHAPTER 1: INTRODUCTION
PLANNING

WEEK 7 WEEK 9
NOW Chapter 2 Chapter 4 Goal

Nov Dec
Dec Dec
WEEK 6 WEEK 8 WEEK 10
Chapter 1 Chapter 3 Chapter 5
DO YOU REMEMBER?

 What is a computer?
 What is the basic operations of a computer?
 First computer language?
 Second programming language?
 Third level of programming language?
BASIC OPERATION OF A COMPUTER
PROGRAM AND PROGRAMMING

Program Programming
■ Program is made up of
■ A process of problem
sequence of instructions and
solving.
decisions that the computer
carries out to achieve a
specific task.
PROGRAMMING LANGUAGE

Programming Computer
language language
Language used to write Low level: Assembly
computer program, it Language
allows human to High level: C, C++
communicate instructions
to machines.

Programming
paradigm

Object-oriented
Functional
Logic
COMPILATION PROCESS

Process:

Source Code – high level language

Compiler – interpreted into machine


language
Linker – link the program
with library
Executable code – produce by the
compiler to be run
EXAMPLE OF C++ PROGRAM
Source Code

Output
PROGRAM DEVELOPMENT
LIFE CYCLE
1. ANALYZE THE PROBLEM
2. DESIGN THE SOLUTION

Pseudocode
2. DESIGN THE SOLUTION
Flowchart
ACTIVITY 1

DRAW FLOWCHART FOR THE PROBLEM


ANSWER
3. IMPLEMENT THE PROGRAM
Code using C++ programming language

4. TEST THE PROGRAM


Finding and eliminating errors

5. MAINTAIN THE PROGRAM


Modifying or upgrading the existing system
ACTIVITY 2
Solve the problems below using flowchart and pseudo codes:

1. Calculate the amount a person has to spend on petrol if the price of the petrol is RM2.10
per liter. The amount of petrol used is received as input.

2. Receives the age of a person in years and display the age in days. Assumed that a year
has 365 days.

3. Write pseudo code that will perform the following.


a) Read in 5 separate numbers.
b) Calculate the average of the five numbers.
c) Find the smallest (minimum) and largest (maximum) of the five entered numbers.
d) Write out the results found from steps b and c with a message describing what they are.
ANSWER
THANK YOU
Any questions?

You might also like