Chapter 7 Exam Note (Session 5,7,8,9)

9 Pages

Information Technology Management
Course Code
ITM 207
Henry Ojambo

This preview shows pages 1,2 and half of page 3. Sign up to view the full 9 pages of the document.
Chapter 7 ITM 207 Final Exam Notes Problem Solving and Algorithms Chapter 7 Problem Solving: The act of finding a solution to a perplexing, distressing, vexing, or unsettled question. How to Solve It: A new Aspect of Mathematical Method by George Polya “How to solve it list” written within the context of mathematical problems. How do you solve problems? - Understand the problem - Devise a plan - Carry out the plan - Look back Strategies: - Ask Questions o What do I know about the problem? o What is the information I have to process in order to find the solution? o What does the solution look like? - Similar problems come up again and again - A good programmer recognizes problems that have been solved before and uses past solutions - Divide and Conquer o Break up a large problem into smaller units and solve each smaller problem  Applies the concept of abstraction  The divide-and-conquer approach can be applied over and over again until subtask is manageable Computer Enabled Problem Solving: - Analysis and Specification Phase o Analyze o Specification - Algorithm Development Phase o Develop Algorithm o Test Algorithm - Implementation Phase o Code algorithm o Test Algorithm Chapter 7 ITM 207 Final Exam Notes - Maintenance Phase o Use o Maintain Phase Interactions: Another arrow can be added if the problem is later revised Algorithms: A set of unambiguous instructions for solving a problem or sub-problem in a finite amount of time using a finite amount of data. Abstract Step: An algorithmic step containing unspecified details. Concrete Step: An algorithmic step in which all details are specified. Developing an Algorithm: Two methods to develop computer solutions to a problem: o Top-down design focuses on the tasks to be done o Object-oriented design focuses on the data involved in the solution. Summary of Methodology: - Analyze the problem o Understand the problem Chapter 7 ITM 207 Final Exam Notes o Develop a plan of attack - List the Main Tasks (becomes main module) o Restate problem as a list of tasks (modules) o Give each task a name - Write the remaining Modules o Restate each abstract module as a list of tasks o Give each task a name - Re-sequence and revise as necessary o Process ends when all steps (modules) are concrete Top-Down Design: Process continues for as many levels as it takes to make every step concrete Name of the (sub) problem at one level becomes a module at next lower level Control Structures: An instruction that determines the order in which other instructions in a program are executed. Selection Statements: Flow of control if statement Chapter 7 ITM 207 Final Exam Notes Algorithm with Selection: Problem: Write the appropriate dress for a given temperature. Write "Enter temperature" IF (temperature > 90) Read temperature Write “Texas weather: wear shorts” Determine Dress ELSE IF (temperature > 70) Write “Ideal weather: short sleeves are fine” ELSE IF (temperature > 50) Write “A little chilly: wear a light jacket” ^^ Abstract ^^ ELSE IF (temperature > 32) >> Concrete >> Write “Philadelphia weather: wear a heavy coat” ELSE Write “Stay inside” Looping Statements: Flow of control of while statement A count-controlled loop: An event-controlled loop: Set sum to 0 Set sum to 0 Set count to 1 Set allPositive to true While (count <= limit) WHILE (allPositive) Read number Read number Set sum to sum + number IF (number > 0) Increment count Set sum to sum + number Write "Sum is " + sum ELSE Set allPositive to false Write "Sum is " + sum Chapter 7 ITM 207 Final Exam Notes Composite Data Types: Records: A named heterogeneous collection of items in which individual items are accessed by name. For example, we could bundle name, age and hourly wage items into a record named Employee. Arrays: A named homogeneous collection of items in which an individual item is accessed by its positio
More Less
Unlock Document

Only pages 1,2 and half of page 3 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.