Exam Review 2 Chapter 5 – 9 CS211 November 05,2007, CS Dept, MHC.

Slides:



Advertisements
Similar presentations
C++ Templates. What is a template? Templates are type-generic versions of functions and/or classes Template functions and template classes can be used.
Advertisements

Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
Reviews for Exam 1 Chapter 1-4 CSc 212 Data Structures, Sec FG CCNY, Fall 2010.
Copyright © 2012 Pearson Education, Inc. Chapter 6 More Conditionals and Loops Java Software Solutions Foundations of Program Design Seventh Edition John.
Exam Review 2 Chapter 5 – 9 CSC212 RS March 31, 2011, CS Dept, CCNY.
Final Exam Preview Chapter 4,5,6,7,8,9. Remember to evaluate CS221  Go to  Ends tonight.
Reviews for Exam 1 Chapter 1-4 CS 211 Data Structures MHC, 2007.
Chapter 2: Algorithm Discovery and Design
Wednesday, 12/11/02, Slide #1 CS 106 Intro to Comp. Sci. 1 Wednesday, 12/11/02  QUESTIONS??  Today: CLOSING CEREMONIES!  HW #5 – Back Monday (12/16)
Lecture 7 Model Development and Model Verification.
Testing HCI Usability Testing. Chronological order of testing Individual program units are built and tested (white-box testing / unit testing) Units are.
ECE122 L17: Method Development and Testing April 5, 2007 ECE 122 Engineering Problem Solving with Java Lecture 17 Method Development and Testing.
Chapter 2: Algorithm Discovery and Design
Chapter 2: Algorithm Discovery and Design
1 Software Testing Techniques CIS 375 Bruce R. Maxim UM-Dearborn.
Software Testing Sudipto Ghosh CS 406 Fall 99 November 9, 1999.
Review for Midterm Chapter 1-9 CSc 212 Data Structures.
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
CMSC 345 Fall 2000 Unit Testing. The testing process.
Data Structures Using C++ 2E
Overview of Software Testing 07/12/2013 WISTPC 2013 Peter Clarke.
Invitation to Computer Science, Java Version, Second Edition.
Introduction. 2COMPSCI Computer Science Fundamentals.
Chapter 9: Recursion1 CHAPTER 9 RECURSION. Recursion  Concept of recursion  A recursive: Benefit and Cost  Comparison : Iterative and recursive functions.
Software Testing The process of operating a system or component under specified conditions, observing and recording the results, and making an evaluation.
Chapter 12 Recursion, Complexity, and Searching and Sorting
Recursion Textbook chapter Recursive Function Call a recursive call is a function call in which the called function is the same as the one making.
1 CSC 222: Computer Programming II Spring 2004 See online syllabus at: Course goals:
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 122 – Data Structures Standard Template Library (STL)
COMP 121 Week 1: Testing and Debugging. Testing Program testing can be used to show the presence of bugs, but never to show their absence! ~ Edsger Dijkstra.
1 CSC 222: Object-Oriented Programming Spring 2013 Course goals:  To know and use basic Java programming constructs for object- oriented problem solving.
Copyright © 2012 Pearson Education, Inc. Chapter 6 More Conditionals and Loops Java Software Solutions Foundations of Program Design Seventh Edition John.
Week 9 Data structures / collections. Vladimir Misic Week 9 Monday, 4:20:52 PM2 Data structures (informally:) By size: –Static (e.g. arrays)
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
Foundation of Computing Systems Lecture 3 Stacks and Queues.
C++ Programming: Program Design Including Data Structures, Fourth Edition Chapter 18: Stacks and Queues (part 2)
What is Testing? Testing is the process of finding errors in the system implementation. –The intent of testing is to find problems with the system.
Standard Template Library The Standard Template Library was recently added to standard C++. –The STL contains generic template classes. –The STL permits.
CSC212 Data Structure - Section FG Lecture 11 Templates, Iterators and STL Instructor: Professor Zhigang Zhu Department of Computer Science City College.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 1: Introduction Data.
LECTURE 19 23/11/15 Software Quality and Testing.
Data Structures Chapter 6. Data Structure A data structure is a representation of data and the operations allowed on that data. Examples: 1.Array 2.Record.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
CSC 212 Sequences & Iterators. Announcements Midterm in one week  Will cover through chapter 5 of book  Midterm will be open book, open note (but, closed.
Understanding General Software Development Lesson 3.
SAFEWARE System Safety and Computers Chap18:Verification of Safety Author : Nancy G. Leveson University of Washington 1995 by Addison-Wesley Publishing.
Software Quality Assurance and Testing Fazal Rehman Shamil.
IS2802 Introduction to Multimedia Applications for Business Lecture 4: JavaScript, Loops, and Conditional Statements Rob Gleasure
Exam Review 2 Chapter 5 – 9 CSC212 FG CS Dept, CCNY.
CNG 140 C Programming (Lecture set 12) Spring Chapter 13 Dynamic Data Structures.
CSCI-383 Object-Oriented Programming & Design Lecture 25.
Software Test Plan Why do you need a test plan? –Provides a road map –Provides a feasibility check of: Resources/Cost Schedule Goal What is a test plan?
Understanding General Software Development Lesson 3.
Unit VI.  C++ templates are a powerful mechanism for code reuse, as they enable the programmer to write code (classes as well as functions) that behaves.
UML Diagrams and Software Testing Instructor: Scott Kristjanson CMPT 135 SFU Surrey, Spring 2016.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
CS 215 Final Review Ismail abumuhfouz Fall 2014.
Loop Structures.
CSC 222: Object-Oriented Programming
Template Functions Chapter 6 introduces templates, which are a C++ feature that easily permits the reuse of existing code for new purposes. This presentation.
Prof. Michael Neary Lecture 7: The STL Prof. Michael Neary
Chapter 5 – 9 CSC212 AB April 03, CS Dept, CCNY
Chapter 5 – 9 CSC212 KL Nov 8, CS Dept, CCNY
Template Functions Chapter 6 introduces templates, which are a C++ feature that easily permits the reuse of existing code for new purposes. This presentation.
Chapter 5 – 9 CSC212 RS April 08, CS Dept, CCNY
Template Functions Chapter 6 introduces templates, which are a C++ feature that easily permits the reuse of existing code for new purposes. This presentation.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CSE 1020:Software Development
Presentation transcript:

Exam Review 2 Chapter 5 – 9 CS211 November 05,2007, CS Dept, MHC

In-class Exam 2 Wednesday 11:00am – 12:15pm Open books, open notes, but not open neighbors Coverage: chapter 5 – chapter 9 Questions: –Short-answer questions –Multiple-choice questions

Chapter 5: Linked Lists Node Class (Ex 1-12) Linked List Toolkit (Ex ) The bag Class with a Linked List (Ex 26-35) The sequence class with a Linked List (Ex 36-40: please refer to assignment 4) Comparison of dynamic arrays, linked lists and doubly linked lists (Ex 41-46)

Chapter 6: Templates, Iterators and STL Template Functions and Template Classes –for code that is meant be reused in a variety of settings in a single program –Sections Iterators –step through all items of a container in a standard manner –Sec. 6.3, 6.5, 6.6 Standard Template Library –the ANSI/ISO C++ Standard provides a variety of container classes in the STL –Section 6.3

All you need to know about Templates Template Function –a template prefix before the function implementation –template Function Prototype –a template prefix before the function prototypes Template Class –a template prefix right before the class definition Instantiation –template functions/classes are instantiated when used Better Understanding of classes and functions

Iterators (Sec. 6.3, 6.5, 6.6) We discussed how to build an iterator for the linked list so that each of the containers can build its own iterator(s) easily A node iterator is an object of the node_iterator class, and can step through the nodes of the linked list

Linked List Version the bag Template Class with an Iterator Most of the implementation of this new bag is a straightforward translation of the bag in Chapter 5 that used an ordinary linked list Two new features –Template class with a underlying type Item –iterator and const_iterator – defined from node_iterator and const_node_iterator, but use the C++ standard [...) left inclusive pattern

Standard Template Library (STL) The ANSI/ISO C++ Standard provides a variety of container classes in the STL –set, multiset, stack, queue, string, vector Featured templates and iterators For example, the multiset template class is similar to our bag template class More classes summarized in Appendix H

Chapters 7/8 Stacks and Queues Stacks and LIFO( Read Chapter 7, esp. 7.1 and 7.3 ) –Self-Test: 1-5, Queues and FIFO ( Read Chapter 8, esp. 8.1 and 8.3 ) –Self-Test: 1-5, 10,18-21 Priority Queues ( Read Section 8.4 ) –Self-Test: References Return Values ( Read Section 8.5 and p. 314 in Chapter 6 ) –Self-Test: class note of Lecture 12

Chapter 9 Recursive Thinking Recursive Functions (Section 9.1) –Recursive Calls and Stopping Cases –Activation Record and Run-Time Stack –Self-Test: Exercises 1-8 Reasoning about Recursion (Section 9.3) –Infinite Recursion and One Level Recursion –Ensure no Infinite and Correctness Applications of Recursion(Optional :Section 9.2)

Testing and Debugging Testing: –The goal of testing is to find errors. –Black-box testing Test cases are developed without regard to the internal workings Test cases  equivalent categories Check boundary values: “Off by 1” errors –White-box testing Exercises the internal structure and implementation of a method. Ensure every path through a program is executed at least once. Note: expected output for each test should be established prior to running the test.

More on Testing Unit testing –Create a test case for each module of your code (method) Integration testing –Previously tested modules are now tested as a collection. System testing –Test the entire system –Alpha and beta tests.. Usually prior the formal release of a software product

Debugging –Locating and correcting run-time and logic errors from your programs. Debugger –A software program that permits developers to observe the execution of a program. –Obtain detailed info: values of variables, states of objects …

More on Debugging Simple debugging with print statements –Periodically print variables’ value of objects’ string representation. –Print other types of useful info How far my code got before it died? –Keep tracking of parameter values, esp. recursive functions Debugging Concepts

More on Debugging Simple debugging with print statements Debugging Concepts –Set one or break points –Print the value of a variable or a object –Step into or over a method –Execute the next single statement –Continue execution –Other additional features Debuggers: jdb (JDK), gdb(GNU)