1.43k likes | 1.56k Views
CS0004: Introduction to Programming. Problem Solving and Programming Tools. Review. Machine Language. Review. Machine Language is a system of instructions and data executed directly by a computer's central processing unit . Review.
E N D
CS0004: Introduction to Programming Problem Solving and Programming Tools
Review • Machine Language
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit.
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand.
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events.
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events. • A program
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events. • A program is a collection of instructions.
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events. • A program is a collection of instructions. • A compiler
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events. • A program is a collection of instructions. • A compiler is a computer program that translates high-level language such as VB in Machine Language.
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events. • A program is a collection of instructions. • A compiler is a computer program that translates high-level language such as VB in Machine Language. • Running a program
Review • Machine Language is a system of instructions and data executed directly by a computer's central processing unit. • Higher-Level Languages consists of instruction that people can understand. • Event-driven programming is a paradigm in which the flow of programs are determined by events. • A program is a collection of instructions. • A compiler is a computer program that translates high-level language such as VB in Machine Language. • Running a program is executing the instructions given a program.
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages.
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things:
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things: • Takes in data
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things: • Takes in data • Manipulates the data
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things: • Takes in data • Manipulates the data • Produces some information
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things: • Takes in data • Manipulates the data • Produces some information • If you can break a problem down into these steps, you can create a program to solve it.
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things: • Takes in data • Manipulates the data • Produces some information • If you can break a problem down into these steps, you can create a program to solve it. • But do we start writing code as soon as we run into a problem?
Programming Languages and Problem Solving • In this class we will be using Visual Basic, but there are many things it shares with most programming languages. • Namely, 3 things: • Takes in data • Manipulates the data • Produces some information • If you can break a problem down into these steps, you can create a program to solve it. • But do we start writing code as soon as we run into a problem? • Answer: No.
Algorithms vs. Programs • An Algorithm is
Algorithms vs. Programs • An Algorithm is a step-by-step procedure devised for the purpose of taking in data and producing the correct output.
Algorithms vs. Programs • An Algorithm is a step-by-step procedure devised for the purpose of taking in data and producing the correct output. • A program is the actual implementation of an algorithm in a programming language.
Algorithms vs. Programs • An Algorithm is a step-by-step procedure devised for the purpose of taking in data and producing the correct output. • A program is the actual implementation of an algorithm in a programming language. • Before writing a program, you must develop an algorithm to solve a problem.
Algorithms vs. Programs • An Algorithm is a step-by-step procedure devised for the purpose of taking in data and producing the correct output. • A program is the actual implementation of an algorithm in a programming language. • Before writing a program, you must develop an algorithm to solve a problem. • Very Important: It is highly recommended to think about the problem first, then develop an algorithm, then write the program.
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps:
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps: • Analyze the problem
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps: • Analyze the problem • Plan a solution
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps: • Analyze the problem • Plan a solution • Design an interface
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps: • Analyze the problem • Plan a solution • Design an interface • Write the code
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps: • Analyze the problem • Plan a solution • Design an interface • Write the code • Test and debug
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps: • Analyze the problem • Plan a solution • Design an interface • Write the code • Test and debug • Document the program
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps • Analyze the problem • Plan a solution • Design an interface • Write the code • Test and debug • Document the program • (Not done in this class) Maintain the program
Program Development Cycle • When Developing a program in both the real world AND in this class, there are 6 steps • Analyze the problem • Plan a solution • Design an interface • Write the code • Test and debug • Document the program • (Not done in this class) Maintain the program • To be successful in this class, you must perform each of these steps.
Analyze the Problem • Understand what the problem is and what the solution should be
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do.
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User –
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program.
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program. • End User –
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program. • End User – The person whom the program was designed for him/her to use.
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program. • End User – The person whom the program was designed for him/her to use. • Also keep in mind what the CORRECT solution to the problem is.
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program. • End User – The person whom the program was designed for him/her to use. • Also keep in mind what the CORRECT solution to the problem is. • This needs to be done before ANY of the following steps can take place.
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program. • End User – The person whom the program was designed for him/her to use. • Also keep in mind what the CORRECT solution to the problem is. • This needs to be done before ANY of the following steps can take place. • People have this job in real life: http://en.wikipedia.org/wiki/Software_analyst
Analyze the Problem • Understand what the problem is and what the solution should be • Keep in mind what the End User should be able to see and do. • User – Anyone who uses the program. • End User – The person whom the program was designed for him/her to use. • Also keep in mind what the CORRECT solution to the problem is. • This needs to be done before ANY of the following steps can take place. • People have this job in real life: http://en.wikipedia.org/wiki/Software_analyst
Plan a Solution • Once you understand the problem, you can develop an algorithm.
Plan a Solution • Once you understand the problem, you can develop an algorithm. • Create precise steps for the entire flow of the program. Usually in the form of:
Plan a Solution • Once you understand the problem, you can develop an algorithm. • Create precise steps for the entire flow of the program. Usually in the form of: • Get Input
Plan a Solution • Once you understand the problem, you can develop an algorithm. • Create precise steps for the entire flow of the program. Usually in the form of: • Get Input • Validate Input
Plan a Solution • Once you understand the problem, you can develop an algorithm. • Create precise steps for the entire flow of the program. Usually in the form of: • Get Input • Validate Input • Manipulate Input