Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu.

Similar presentations


Presentation on theme: "CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu."— Presentation transcript:

1 CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu

2 Software Development Cycle Analyze Design Choose the Interface Build Interface and Write Code Test and Debug Complete Documentation

3 Analyze Analyze... the problem; determine the events that the controls on the window should respond to what inputs are needed and supplied what output is required Design Choose the Interface Build Interface and Write Code Test and Debug Complete Documentation

4 Design Analyze Design... an algorithm a sequence of steps to solve the problem Choose the Interface Build Interface and Write Code Test and Debug Complete Documentation

5 Design techniques Three design techniques Flowchart Show graphically the steps needed to complete a task and how they relate to each other Pseudocode Outline the task using English-like and Visual Basic-like phrases Hierarchy Chart Shows how the different parts of a program relate to each other

6 Pseudocode Ask the user for a number. If it's 0 (zero) print “no zero, pls”. If it's not zero, display the result of 70/number. -------------------------------- PRINT "Enter number: " READ number IF number IS 0 PRINT "Enter number: ” ELSE PRINT 70/number

7 Choose the Interface Analyze Design Choose the Interface how to obtain input from the user text box, combo box, list, menu, button, etc. how to display any results to the user text box, table, graphics, etc. Build Interface and Write Code Test and Debug Complete Documentation

8 Building Interface and Write Code Analyze Design Choose the Interface Build Interface and Write Code Create interface using VB controls Adjust settings of controls; write the handlers for the events defined in step 2 (design phase) Translate algorithm into VB Comment Code Test and Debug Complete Documentation

9 Test and Debug Analyze Design Choose the Interface Build Interface and Write Code Test and Debug Testing: Finding errors in your program Run program on expected input Run program on unexpected input Debugging: Fixing errors in your program Complete Documentation

10 Analyze Design Choose the Interface Build Interface and Write Code Test and Debug Complete Documentation Finalize comments in code Create document describing: What program does What its input and output are

11 Rock/Paper/Scissors Game ***************** Write a program that will simulate the rock/paper/scissors game. You will play against the computer. The program will display who won.


Download ppt "CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu."

Similar presentations


Ads by Google