tailieunhanh - Lecture Introduction to Computer Programming - Lecture 3

This chapter define the term computer program, describe the use of flowcharts and pseudocode in programming, identify two ways in which a program can work toward a solution, differentiate the two main approaches to computer programming, list and describe three elements of object-oriented programming. | CSC141 Introduction to Computer Programming Teacher: AHMED MUMTAZ MUSTEHSAN Lecture - 3 Problem Solving and Implementation A programming task can be divided into two phases: 1. Problem solving Define : Clearly describe a problem Design its solution: Produce an ordered sequence of steps that describe solution to the problem; 2. Implementation phase Implement the program in some programming language write code, compile, link, Test & Debug Developing a program Problem solving Phase Implementation phase Defining a Problem: Break the definition of the problem down into manageable steps. Example; input, Processing; Output Input ; Read the temperature from keyboard Processing; Test the Temperature below or above freezing Output; Display the result on Screen Users: Identify the users. Feasibility & Implementation. Design the solution Algorithm A sequence of language independent steps which may be followed to solve a problem. An Algorithm can be developed with a: Pseudo Code Flowchart Preferably using control Structures. Algorithm Pseudo code Pseudo code is a method of designing a program using English like statement to describe the logic and processing flow. There are no real rules; organizations follow their own standards. Conveniently understood and exchanged between IT professionals. Defining a Problem: Break the definition of the problem down into manageable steps; Input, Processing; Output Example -1: Read in the temperature. If the temperature is less than 32 indicate below freezing on the screen. Else if the temperature is above freezing then indicate the same on the monitor screen. Divide the above problem into manageable parts. Input ; Read the temperature from keyboard Processing; Test the Temperature below or above freezing Output; Display the result on Screen Algorithm Pseudo code Example -1: Read the Temp if (Temp < 32) then Print “BELOW FREEZING” else Print “ABOVE FREEZING” endif Algorithm Flowchart Diagrammatic or Graphical representations of . | CSC141 Introduction to Computer Programming Teacher: AHMED MUMTAZ MUSTEHSAN Lecture - 3 Problem Solving and Implementation A programming task can be divided into two phases: 1. Problem solving Define : Clearly describe a problem Design its solution: Produce an ordered sequence of steps that describe solution to the problem; 2. Implementation phase Implement the program in some programming language write code, compile, link, Test & Debug Developing a program Problem solving Phase Implementation phase Defining a Problem: Break the definition of the problem down into manageable steps. Example; input, Processing; Output Input ; Read the temperature from keyboard Processing; Test the Temperature below or above freezing Output; Display the result on Screen Users: Identify the users. Feasibility & Implementation. Design the solution Algorithm A sequence of language independent steps which may be followed to solve a problem. An Algorithm can be developed with a: Pseudo Code .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.