Week-1-CCIS112-ProgramLogicFormulation.pdf
Document Details
Uploaded by DevoutInfinity3791
Tags
Full Transcript
Week – 1 and 2 Lesson 1: Program Logic Formulation Problem Solving Programming Concept 5 Programming Elements Programming Cycle LECTURE OUTLINE: Problem Solving Programming INTRODUCTION Concept Intelligence is one of the key characte...
Week – 1 and 2 Lesson 1: Program Logic Formulation Problem Solving Programming Concept 5 Programming Elements Programming Cycle LECTURE OUTLINE: Problem Solving Programming INTRODUCTION Concept Intelligence is one of the key characteristics which differentiate a human 5 Programming being from other living creatures on the earth. Elements Programming Cycle Basic intelligence covers day to day problem solving and making strategies to handle different situations which keep arising in day to day life. One person goes to bank to withdraw money. After knowing the balance in his account, he/she decides to withdraw the entire amount from his account but he/she has to leave minimum balance in his account. Here deciding about how much amount he/she may with draw from the account is one of the examples of the basic intelligence. During the process of solving any problem, one tries to find the necessary steps to be taken in a sequence. LECTURE OUTLINE: Problem Solving Programming PROBLEM SOLVING Concept 5 Programming Elements Can you think of a day in your life which goes without problem solving? Programming Cycle Answer to this question is of course, No. In our life we are bound to solve problems. In our day to day activity such as purchasing something from a general store and making payments, depositing fee in school, or withdrawing money from bank account. All these activities involve some kind of problem solving. It can be said that whatever activity a human being or machine do for achieving a specified objective comes under problem solving. To make it clearer, let us see some other examples. LECTURE OUTLINE: Example1: Problem Solving If you are watching a news channel on your TV and you want to change it to a sports channel, you need to do Programming something i.e. move to that channel by pressing that channel number on your remote. This is a kind of Concept problem solving. 5 Programming Example 2: Elements Programming Cycle One Monday morning, a student is ready to go to school but yet he/she has not picked up those books and copies which are required as per timetable. So here picking up books and copies as per timetable is a kind of problem solving. Example 3: If someone asks to you, what is time now? So seeing time in your watch and telling him is also a kind of problem solving. Example 4: Some students in a class plan to go on picnic and decide to share the expenses among them. So, calculating total expenses and the amount an individual have to give for picnic is also a kind of problem solving. LECTURE OUTLINE: Problem Solving Programming Concept 5 Programming Elements PROGRAMMING CONCEPTS: Programming Cycle Logic - The systematic study of reasoning that provides standards by which valid reading can be recognized Programming - Computer process data under the control set of instruction. Programmer - Computer program guide the computer through orderly sets of actions by people. Programming Language - A set of rules that provides a way of telling a computer what operation to perform. LECTURE OUTLINE: Problem Solving FIVE (5) BASIC PROGRAMMING ELEMENTS Programming Concept 5 Programming Elements Programming Cycle 1. Input getting data and commands into the computer 2. Output getting your results out of the computer 3. Arithmetic performing mathematical calculations on your data 4. Conditional testing to see if a condition is true or false 5. Looping cycling through a set of instructions until some condition is met LECTURE OUTLINE: PROGRAMMING CYCLE Problem Solving Programming Concept The computer is basically a problem-solving tool. Once it is properly 5 Programming Elements provided with a valid program, the computer becomes self-operational, Programming Cycle that is, it requires no human intervention during processing. To use this tool effectively, the programmer usually has to perform the following set of well define steps. 1. Defining the Problem One of making sure what was has to be done or what problem has to be solved. A careful analysis of that need should involve both prospective users of the information and one or more trained systems designers or programmers, who can perceive. The full nature of the information need and how the computer can be used to respond to it. LECTURE OUTLINE: Problem Solving 2. Planning the Solution Programming Concept This is the next step, after the problem has been defined, select 5 Programming Elements the best method for solving the problem. This commonly involves Programming Cycle determining the sequence of processing steps within individual programs. To save on time and effort, the programmer refers to a pictorial representation, the program flow chart. The flow chart is an all-purpose tool and a program blueprint. The programmer constructs the flow chart to lay out the Program logic. LECTURE OUTLINE: 3. Coding the Solution Problem Solving Programming Concept Once the programmer is satisfied that all processing steps have been 5 Programming identified and all alternatives and exceptions provided for, the Elements Programming Cycle program is then made. The program flow chart serves as a guide in coding. 4. Checking out the program Experience will prove that a program seldom executes successfully the first time. Even the simplest programs contain errors, and even experienced programmers make mistakes. LECTURE OUTLINE: 5. Documentation Problem Solving Programming Concept After a program has been fully tested and implemented, the programmer must write up the full specifications for all users. 5 Programming Elements The technical documentation package should include: Programming Cycle 1. Complete statement of the problem. 2. Description of the program logic and copies flow charts. 3. Final source listing. 4. List and description or error tests along with the disposition of these error. 5. Operating instructions, including program and data structures, and test data used. 6. Input and output specifications. 7. Schedules to be maintained. "Programming is the art of taking a complex problem and breaking it down into simple, logical steps."