Object-Oriented-Design

Object-Oriented-Design - COE318 Fall 2008, Olivia Das,...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 1 Software Development Activities Requirements Analysis Software requirements: what a program must accomplish Design Implementation Testing COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 2 Software Development Activities Requirements Analysis Software requirements: what a program must do, NOT how it will do it Functional requirements Non-functional requirements COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 3 Software Development Activities Design how a program will accomplish its requirements O-O design: identify the classes and objects define how they interact relationship among the classes COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 4 Software Development Activities Implementation process of writing the source code translating the design into a particular programming language focus on coding details, coding guidelines and documentation COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 5 Software Development Activities Testing ensure that a program does what it should do COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 6 O-O Design : Identifying Classes and Objects A partial requirements document: The user must be allowed to specify each product by its primary characteristics , including its name and product number . If the bar code does not match the product , then an error should be generated to the message window and entered into the error log . The summary report of all transactions must be structured as specified in section 7.A. NOT all nouns will correspond to a class or object in the final solution COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 7 Class Relationships Three most common relationships: Dependency: A depends on (uses) B Aggregation: A has-a B Inheritance: A is-a B COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 8 public class Circle { private double radius; private Point centre; public static final double PI = 3.14159; public Circle() { radius = 1; centre = new Point( 0, 0 ); } public Circle( double r, Point p ) { radius = r; centre = p; } Circle class: save in a file Circle.java COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 9 Circle class (continued) public void setRadius(double r) { radius = r; } public double getRadius() { return radius; } public void setCentre( Point p ) { centre = p; } COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 10 Circle class (continued) public Point getCentre() { return centre; } public double area() { return PI * square(radius); } private double square(double r) { return r*r; } COE318 Fall 2008, Olivia Das, Elec. and Comp. Engg., Ryerson University 11 Circle class (continued) public double circumference() {...
View Full Document

Page1 / 48

Object-Oriented-Design - COE318 Fall 2008, Olivia Das,...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online