Algorithms and Problem Solving-1 Algorithms and Problem Solving Mainly based on Chapter 6: “Problem Solving and Algorithm Design” from the Book: “Computer.

Slides:



Advertisements
Similar presentations
CRC Before you can build an object-oriented system, you have to define the classes (objects) that represent the problem to be solved, how the classes relate.
Advertisements

Problem Solving and Algorithm Design
6-1 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer problem-solving process and relate it to Polya’s.
Problem Solving and Algorithm Design
Chapter 6 Problem Solving and Algorithm Design. 2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
Chapter 6 Problem Solving and Algorithm Design. 6-2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
Algorithms and Problem Solving-1 Algorithms and Problem Solving Mainly based on Chapter 6: “Problem Solving and Algorithm Design” from the Book: “Computer.
Problem Solving #1 ICS Outline Review of Key Topics Review of Key Topics Example Program Example Program –Problem 7.1 Problem Solving Tips Problem.
James Tam A High-Level Model For Software Development What is involved in the process of designing, writing and maintaining computer programs?
1 Chapter 6 Object-Oriented Software Design and Implementation.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
Algorithms and Problem Solving
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Chapter 2: Algorithm Discovery and Design
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
6-1 Problem Solving Problem solving is the act of finding a solution to a perplexing, distressing, vexing, or unsettled question.
Software Engineering Principles and C++ Classes
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Software Engineering 3 rd Bachelor Informatics Ahmed Lamkanfi October 15, 2009.
Problem Solving and Algorithm Design
Chapter 2: Algorithm Discovery and Design
Object-Oriented Design and High-Level Programming Languages
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Chapter 9 High-Level Programming Languages: C++. Chapter Goals Describe the expectations of high level languages Distinguish between functional design.
Chapter 4 ADT Sorted List.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Carolyn Seaman University of Maryland, Baltimore County.
Chapter 9 Object-Oriented Design and High-Level Programming Languages.
Chapter 4 ADT Sorted List. 2 Goals Describe the Abstract Data Type Sorted List from three perspectives Implement the following Sorted List operations.
Invitation to Computer Science, Java Version, Second Edition.
Problem Solving and Algorithm Design. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing, or unsettled.
Abstraction IS 101Y/CMSC 101 Computational Thinking and Design Tuesday, September 17, 2013 Marie desJardins University of Maryland, Baltimore County.
Chapter 3 Developing an algorithm. Objectives To introduce methods of analysing a problem and developing a solution To develop simple algorithms using.
1 C++ Plus Data Structures Nell Dale Chapter 1 Software Engineering Principles Modified from the Slides made by Sylvia Sorkin, Community College of Baltimore.
Developing an Algorithm
CPS120 Introduction to Computer Programming The Programming Process.
Chapter 6 Problem Solving and Algorithm Design Nell Dale John Lewis.
Chapter 6 Problem Solving and Algorithm Design. 2 Problem Solving Problem solving The act of finding a solution to a perplexing, distressing, vexing,
Chapter 6 Problem Solving and Algorithm Design. 2 Chapter Goals Apply top-down design methodology to develop an algorithm to solve a problem Define the.
Programming Life Cycle Problem analysisunderstand the problem Requirements definition specify what program will do High- and low-level designhow it meets.
Data Structures Using C++1 Chapter 1 Software Engineering Principles and C++ Classes.
Developing an Algorithm. Simple Program Design, Fourth Edition Chapter 3 2 Objectives In this chapter you will be able to: Introduce methods of analyzing.
Data Structures Using C++ 2E
CS139 – Algorithm Development Aug 23, 2004 WELCOME!
CSI 1340 Introduction to Computer Science II Chapter 1 Software Engineering Principles.
Chapter 6 Problem Solving and Algorithm Design. 2 Chapter Goals Determine whether a problem is suitable for a computer solution Describe the computer.
Chapter 4 ADT Sorted List. Sorted Type Class Interface Diagram SortedType class IsFull GetLength ResetList DeleteItem PutItem MakeEmpty GetItem Private.
Intelligent Space 國立台灣大學資訊工程研究所 智慧型空間實驗室 Brainstorming Principles Reporter Chun-Feng Liao Sep 12,2005 Source D.Bellin and S.S.Simone, ”Brainstorming: A.
Algorithms CS280 – 10/20/05. Announcement  Part 1 of project 2 due.  Read chapters 10, 7 for this unit  Tuesday we will also be in the classroom We.
Chapter 1 Software Engineering Principles. Problem analysis Requirements elicitation Software specification High- and low-level design Implementation.
Problem-solving with Computers. 2Outline  Computer System  5 Steps for producing a computer program  Structured program and programming  3 types of.
1 Chapter 4 ADT Sorted List. 2 Sorted Type Class Interface Diagram SortedType class IsFull LengthIs ResetList DeleteItem InsertItem MakeEmpty RetrieveItem.
Chapter 2 Principles of Programming and Software Engineering.
What is a Brainstorm Session? Brainstorming is a process of spontaneous thinking used by an individual or by a group of people to generate a number of.
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
CS 101 – Oct. 7 Solving simple problems: create algorithm Structure of solution –Sequence of steps (1,2,3….) –Sometimes we need to make a choice –Sometimes.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
An informal, team oriented, OO design system
Algorithms and Problem Solving
C++ Plus Data Structures
Object-Oriented Design
Chapter 1 Software Engineering.
PROBLEM SOLVING SKILLS
Problem Solving and Algorithm Design
CRC Card Design A CRC Model is a collection of cards (usually standard index cards or larger) that are divided into three sections. 1. Class 2. Responsibility.
Algorithms and Problem Solving
Chapter 6 Study Guide Task
Presentation transcript:

Algorithms and Problem Solving-1 Algorithms and Problem Solving Mainly based on Chapter 6: “Problem Solving and Algorithm Design” from the Book: “Computer Science Illuminated” by Nell Dale and John Lewis.

Algorithms and Problem Solving-2 A Computer Example Problem –Create an address list that includes each person’s name, address, telephone number, and address –This list should then be printed in alphabetical order –The names to be included in the list are on scraps of paper and business cards

Algorithms and Problem Solving-3 A Computer Example

Algorithms and Problem Solving-4 A Computer Example

Algorithms and Problem Solving-5 A Computer Example

Algorithms and Problem Solving-6 A Computer Example

Algorithms and Problem Solving-7 Testing the Algorithm The process itself must be tested Testing at the algorithm development phase involves looking at each level of the top-down design

Algorithms and Problem Solving-8 Testing the Algorithm Desk checking: sit at a desk with a pencil and paper and work through the design Walk-through: Manual simulation of the design by the team members –Take sample data values and simulate the design using the sample data Inspection: The design is handed out in advance, and one person (not the designer) reads the design line by line while the others point out errors

Algorithms and Problem Solving-9 Object-Oriented Design Methodology Four stages to the decomposition process –Brainstorming –Filtering –Scenarios –Responsibility algorithms

Algorithms and Problem Solving-10 CRC Cards

Algorithms and Problem Solving-11 Brainstorming A group problem-solving technique that involves the spontaneous contribution of ideas from all members of the group –All ideas are potential good ideas –Think fast and furiously first, and ponder later –A little humor can be a powerful force Brainstorming is designed to produce a list of candidate classes

Algorithms and Problem Solving-12 Filtering Determine which are the core classes in the problem solution There may be two classes in the list that have many common attributes and behaviors There may be classes that really don’t belong in the problem solution

Algorithms and Problem Solving-13 Scenarios Assign responsibilities to each class There are two types of responsibilities –What a class must know about itself (knowledge) –What a class must be able to do (behavior) Encapsulation is the bundling of data and actions in such a way that the logical properties of the data and actions are separated from the implementation details

Algorithms and Problem Solving-14 Responsibility Algorithms The algorithms must be written for the responsibilities –Knowledge responsibilities usually just return the contents of one of an object’s variables –Action responsibilities are a little more complicated, often involving calculations

Algorithms and Problem Solving-15 Computer Example Let’s repeat the problem-solving process for creating an address list Brainstorming and filtering –Circling the nouns and underlining the verbs Page 171

Computer Example First pass at a list of classes

Computer Example Filtered list

Algorithms and Problem Solving-18 CRC Cards

Algorithms and Problem Solving-19 Responsibility Algorithms