/
CHAPTER 1: INTRODUCTION TO COMPUTER, PROGRAM & PROGRAMMING LANGUAGE CHAPTER 1: INTRODUCTION TO COMPUTER, PROGRAM & PROGRAMMING LANGUAGE

CHAPTER 1: INTRODUCTION TO COMPUTER, PROGRAM & PROGRAMMING LANGUAGE - PowerPoint Presentation

spiderslipk
spiderslipk . @spiderslipk
Follow
342 views
Uploaded On 2020-06-25

CHAPTER 1: INTRODUCTION TO COMPUTER, PROGRAM & PROGRAMMING LANGUAGE - PPT Presentation

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING 1 PART 3 CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING 24 15 Source Department of Statistics 2013 Recommendation ID: 787349

program problem solving computer problem program computer solving algorithm fundamentals development cycle life pdlc algorithms csc126 data flowchart analysis

Share:

Link:

Embed:

Download Presentation from below link

Download The PPT/PDF document "CHAPTER 1: INTRODUCTION TO COMPUTER, PRO..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

CHAPTER 1: INTRODUCTION TO COMPUTER, PROGRAM & PROGRAMMING LANGUAGE

CSC126 FUNDAMENTALS OF ALGORITHMS AND

COMPUTER PROBLEM SOLVING

1

PART 3

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide2

24%

15%

Source: Department of Statistics, 2013

Recommendation

Target BFSI and Manufacturing BPO as they are large segments of offshoring

Provide Legal Process outsourcing to countries with similar Commonwealth Law judiciary

Current Digital Malaysia Project

Business Services: EPP2 to develop globally competitive outsourcers; EPP3 to position Malaysia as a world class DC hub; EPP5 to grow pure play engineering services and Financial Services:EPP10 to be the Islamic Finance KPO hub

Big Data Analytics (Situational Analysis)

MNCs in Malaysia run programs like Oracle’s Big Data Appliance, Google Developers -

BigQuery to spur tech capability, mentoring and guidance for developers Sufficient talent supply as 47% of present undergraduates in local IPTA and IPTS are in the field of data scientists/data engineers/analysts (Source : MoHE 2011) EPP2 and EPP 3 drives shared services and data centers in Malaysia.

Mobility (Situational Analysis)

Mobility is forecast to be valued at USD$1.2 trillion by 2020, driven by the growth of smart phones and tablets

(Source: Gartner)

Asia Pacific will take up 26% of worldwide mobile data usage in 2014

(Source: Gartner)

Incentives and innovation platform exist locally complement the push and support for new mobility entrepreneurs

2

LESSON OUTCOMES

Describe

what a computer program

is

Explain the

importance of programming

to computer use

Appreciate the

importance of good programs

Explain the relationship between

compilers

,

interpreters

and

programs Recognize program errors Become familiar with the program design process    

2015 Postgraduate 2015

Upon completion of this chapter, students should be able to:

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide3

Problem Definition (

Analysis

)

Algorithm Design

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

3

In designing a program, there is no complete set of rules or specific

algorithm to follow. However, software developers try to use a reasonably

consistent problem solving approach for constructing computer programs.

Algorithm Implementation (

Coding

)

Program Testing

Program Maintenance

PROBLEM

SOLVING

IMPLEMENTATION

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide4

1

PROBLEM DEFINITION (ANALYSIS)

Problem definition is also called the

analysis

phase. The problem is defined to obtain a

clear understanding

of the

problem requirement

.The following questions should be asked to get a complete problem specification:a. What are the input data?b. What are the output (desired) data?c. What formula is to be used?d. What other assumptions or constraints can be made?e. What is the

expected output

screen?

4

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide5

IPO Chart

STEP 1: ANALYSIS

Input

Process Output

yearBornAge = currentYear - yearBorn

Age

Slide6

2

ALGORITHM DESIGN

The specifications derived earlier in the analysis phase are translated into the algorithm.

An algorithm is a

step‐by‐step sequence of precise instructions

that must terminate and describes how the data is to be processed to produce the desired outputs. The instruction may be expressed in a human language.

6

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide7

2

ALGORITHM DESIGN

An algorithm

must satisfy

some

requirements

:

a.

Input and outputIt must have zero or more input and must produce at least one output.b. UnambiguousEvery step in algorithm must be clear as to what it is supposed to do and how many times it is expected to be executed.c. Correct and efficientIt

must be correct

and

efficiently solve the problem

for it is designed.

d.

Finite

It must execute its instruction and terminate in a finite time.

7

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide8

2

(i) Pseudocode

Use

English‐like phrases

to

describe the processing task

. It is not standardized since every programmer has his or her own way of

planning the algorithm

.

8

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

An algorithm can be written or described using several tools:

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide9

2

Pseudocode style

9

CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

1

An algorithm can be written or described using several tools:

Style 1

Style 2 (Modular design)

Problem

Begin

1.

Subproblem

1

Task 1,1

Action 1,1,1

Action 1,1,2

2.

Subproblem

2

Task 1,2

Action 1,2,1

Action 1,2,2

End

Problem

Begin

1.

Subproblem

1

2. Subproblem 23. End1. Subproblem 1Task 1,1Action 1,1,1 Action 1,1,22. Subproblem 2Task 1,2Action 1,2,1Action 1,2,2End

Slide10

2

(ii) Flowchart

Use

standardized symbol

to

show the steps the computer needs to take to accomplish the program’s objective

.

Because flowcharts are cumbersome to revise, they have fallen out of favour by professional programmers. Pseudocode, on the other hand, has gained increasing acceptance.

10

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

An algorithm can be written or described using several tools:

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide11

2

11

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

An algorithm can be written or described using several tools:

Flowchart Symbols

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide12

2

(ii) Flowchart (cont.)

Most computer algorithms consist of at least the following processes.

a. Get the

input

(

data

)

b. Perform the computation (processing) c. Display the output (results)

12

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

An algorithm can be written or described using several tools:

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide13

3

ALGORITHM IMPLEMENTATION (CODING)

The algorithm is

translated into a computer program

by using a specific programming language, for example C++. The process called coding, which involves

editing

,

compiling

and debugging.

13

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

PROGRAM TESTING

Program testing requires testing the completed program

to verify that it produces expected output

. A

different set of testing data

is normally used to verify that the program works properly and that it is indeed solving the given problem.

4

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide14

5

PROGRAM MAINTENANCE

Often, there may be

new requirements to be added

into the current program. Making revisions to meet the changing needs with ongoing correction of problem are the major efforts in the program maintenance.

As a result, the program codes may be

modified

,

added or deleted accordingly. Thus, it is very important that a program is well documented for future development.

14

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide15

Write a complete C++ program to calculate the

sum

and

average

of

2 integer numbers

, and then

display the sum and the average

of those numbers.

15

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide16

STEP 1: PROBLEM DEFINITION (ANALYSIS)

16

CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

Slide17

STEP 2: ALGORITHM DESIGN (

Pseudocode

/Flowchart)

17

CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

(i) Pseudocode

Slide18

STEP 2: ALGORITHM DESIGN (Pseudocode/

Flowchart

)

18

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

(ii) Flowchart

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide19

STEP 2: ALGORITHM DESIGN (Pseudocode/

Flowchart

)

19

CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

(ii) Flowchart

Slide20

STEP 3: ALGORITHM IMPLEMENTATION (CODING)

20

CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

Simple Sequential

Slide21

STEP 3: ALGORITHM IMPLEMENTATION (CODING)

21

CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING

PROGRAM DEVELOPMENT LIFE CYCLE (PDLC)

EXAMPLE OF PROBLEM

Simple Modular

Slide22

22

Simple Sequential

Slide23

23

Simple Modular

Slide24

Defence of Research Proposal (DRP) | 30th of October 2014

24

Simple Sequential

Slide25

25

Simple Modular

Slide26

Write a program that will get two numbers from user. Find the summation and the display the result.

Exercise: Problem 1

Slide27

Write a program that will get two numbers from user. Find the average and the display the result.

Exercise: Problem 2

Slide28

To calculate the total of students in a school if the total of boy student are 501 and the total of the girl student is 700.

Exercise: Problem 3

Slide29

Assume that you have to write a program to calculate area of a circle using the formula given:

area = radius * radius * 3.142

a) define the input, process and output b) draw the flowchart

c) write the pseudocodeExercise 1

Slide30

Write a pseudocode and a flowchart for converting temperature from Fahrenheit to Celsius. User need to input the Fahrenheit. The formula is as follow:

celsius = 5.0/9.0 * (Fahrenheit – 32.0)

Exercise 2

Slide31

Calculate the net salary for a temporary staff based on the basic salary entered by the user. The net salary is a gross salary minus EPF deduction. EPF deduction is 11% of gross salary. Gross salary is the total of basic salary, housing allowance and general allowance. Housing allowance is 10% and general allowance is 12% of basic salary.

Slide32

Assume that you have to write a program to calculate the area of rectangle.

Determines the input, output, process.

Draw the flowchartWrite the pseudocodeExercise 3

Slide33

24%

15%

Source: Department of Statistics, 2013

Recommendation

Target BFSI and Manufacturing BPO as they are large segments of offshoring

Provide Legal Process outsourcing to countries with similar Commonwealth Law judiciary

Current Digital Malaysia Project

Business Services: EPP2 to develop globally competitive outsourcers; EPP3 to position Malaysia as a world class DC hub; EPP5 to grow pure play engineering services and Financial Services:EPP10 to be the Islamic Finance KPO hub

Big Data Analytics (Situational Analysis)

MNCs in Malaysia run programs like Oracle’s Big Data Appliance, Google Developers -

BigQuery to spur tech capability, mentoring and guidance for developers Sufficient talent supply as 47% of present undergraduates in local IPTA and IPTS are in the field of data scientists/data engineers/analysts (Source : MoHE 2011) EPP2 and EPP 3 drives shared services and data centers in Malaysia.

Mobility (Situational Analysis)

Mobility is forecast to be valued at USD$1.2 trillion by 2020, driven by the growth of smart phones and tablets

(Source: Gartner)

Asia Pacific will take up 26% of worldwide mobile data usage in 2014

(Source: Gartner)

Incentives and innovation platform exist locally complement the push and support for new mobility entrepreneurs

33

Describe

FIVE (5) steps

of

Program Development Life Cycle (PDLC).

Define an

algorithm

.

Define a

flowchart

.

Define a

pseudocode

.

 

2015 Postgraduate 2015

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING

Slide34

34

END OF CHAPTER 1

CSC126 FUNDAMENTALS OF ALGORITHMS AND COMPUTER PROBLEM SOLVING