


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Analysis/Requirements: What am I doing? Design: Which classes and methods? Implementation: How do I do it? Testing: Does it work? Maintenance: I just turn it in, right?
z Programming is not just coding and debugging! z Analysis
Analysis
Implementation
Design
Testing Maintenance Waterfall model of software development
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 58
z Design: Measure twice, cut once!
z Implementation
Analysis
Implementation
Design
Testing Maintenance Waterfall model of software development
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 59
y g z Testing
z Maintenance
z Software development not usually as linear as waterfall model
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 60
p g g p g g , go back during testing and debugging to change implementation
z What makes a program “good” or a “horror”?
z Abstraction : The ability to view a complex operation in a simplified form
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 61
z Class Cohesion : the degree to which the methods of a class deal with a specific abstraction
z Precondition : A condition that must be true about the state of the system (input parameters, instance variables, etc.) before executing a method
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 62
of a routine.
z Checking input from users is generally a necessary step in satisfying method preconditions
z For most programmers, these two steps are be inseparable and cyclic z For each class
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 66
z We are going to build a text-based version of the game “Battleship” z Our gameboard is going to be 2d 5x5 grid that prints as follows:
1 2 3 4 5 A ~. ~ ~ ~ B ~ x ~ ~ ~ C ~ ~ ~ ~ ~ D * * *
Wright State University, College of EngineeringDr. T. Doom, Computer Science & Engineering CS 241Computer Programming II 67
-. represent an previously targeted miss
D * * * ~ ~ E. ~ ~ ~ ~