CS 200 Lab Week 2: Grammar Exercises, Testing and Debugging - Prof. Asa Ben-Hur, Study notes of Computer Science

The activities for cs 200 lab week 2, including handing back quiz 1, grammar exercises, testing and debugging. Various grammar rules and testing strategies, providing examples and instructions for testing individual classes and using the eclipse debugger.

Typology: Study notes

Pre 2010

Uploaded on 03/10/2009

koofers-user-1lm
koofers-user-1lm 🇺🇸

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 200 Lab, week 2
Hand back quiz 1
Grammar exercises
Testing and debugging
pf3
pf4
pf5
pf8

Partial preview of the text

Download CS 200 Lab Week 2: Grammar Exercises, Testing and Debugging - Prof. Asa Ben-Hur and more Study notes Computer Science in PDF only on Docsity!

CS 200 Lab, week 2

● Hand back quiz 1 ● Grammar exercises ● Testing and debugging

Grammars

● Describe the strings that can be produced by the following grammars:

  • (^) → , → ab, → bb
  • (^) → , → , → aa, → aa, → b, → b
  • (^) → → 0 | 1 | 0 → 1

Testing and Debugging

● Testing individual classes ● Testing your whole program ● Using the Eclipse debugger ● Testing exercise

Testing

● You aren’t done with your code until you have tested it!

Testing Strategies

● Focus each test case on a specific requirement ● Make test cases small ● Make sure to test all requirements ● Remember to test exception and error cases!

Testing Exercise

● Code and specification are available on the recitations page ● Create test cases for this program ● Can place your test cases in a public directory and access others’ test cases there ● First, we’ll go through an example with the debugger...