Download presentation
Presentation is loading. Please wait.
Published byDarlene Stone Modified over 8 years ago
1
ECE 264 Object-Oriented Software Development Instructor: Dr. Honggang Wang Fall 2012 Lecture 2: Software Design Cycle
2
Lecture outline Announcements/reminders For MSDN account, e-mail Andrew Smart (andrew.smart@umassd.edu)andrew.smart@umassd.edu MUST contact Andrew using your UMassD e-mail Non majors can use MS DreamSpark (www.dreamspark.com)www.dreamspark.com Quick review of pretest Software design cycle General overview Software engineering steps Types of testing 6/3/2016 ECE 264: Lecture 2 2
3
6/3/2016 ECE 264: Lecture 2 3 Pretest review Pretest intended to review the following Control structures (if/else, switch, loops) Basic data types Array accesses C output First three topics use exactly the same syntax in C++! We’ll cover C++ output starting in lecture 3
4
Pretest review: if/else statements int x, y;. if (x < 5) { y = x + 1; } else { y = x – 2; } 1. At the end of the if/else statement above, if x = 4, y is equal to: a. 1b. 2 c. 4d. 5 2. Now, if x = 5, y is equal to: a. -2b. 3 c. 5d. 6 6/3/2016 ECE 264: Lecture 2 4
5
Pretest review: loops int x = 1; int i = 0; while (i <= 3) { x = x * 2; i++; } 3. Fill in the blank: The body of the while loop executes ______ times. a. 2b. 3 c. 4 d. an infinite number of 4. The final value of x is: a. 2b. 3 c. 8 d. 16 5. Which of the following is a for loop that can replace the while loop and produce the same result for x? a. for (i = 1; i < 4; i++) b. for (i = 0; i < 3; i++) c. for (x = 0; x <= 3; x++) d. for (i = 3; i >= 0; i--) 6/3/2016 ECE 264: Lecture 2 5
6
Pretest review: arrays, I/O int A[5] = {0, 7, 13, 12, 5}; for (i = 0; i < 5; i++) { printf(“A[%d] + 3 = %d\n”, i, A[i] + 3); } 6. In the first iteration, the program will display the following text on the screen: a. A[%d] + 3 = %d\n b. A[i] + 3 = A[i] + 3 c. A[0] + 3 = 3 d. A[1] + 3 = 10 7. The value of A[4] is: a. 4 b. 5 c. 12 d. non-existent 6/3/2016 ECE 264: Lecture 2 6
7
Pretest review: switch statements switch (var) { case 0: case 1: x = x + var; break; case 2: x = x – var; case 3: x = x * var; break; default: x = var; } Assume x always equals 5 at the start of the switch statement. What is the value of x at the end of the statement if: 8. var = 1? a. 1b. 4 c. 5 d. 6 9. var = 2? a. 2b. 3 c. 6 d. 7 10. var = 5? a. 0 b. 5 c. 10 d. 25 6/3/2016 ECE 264: Lecture 2 7
8
Software design cycle Software engineering: application of systematic approach to development, operation, and maintenance of software Not just programming! Lots of management involved Traditional software design cycle Requirements engineering Design Programming Integration Delivery Maintenance 6/3/2016 ECE 264: Lecture 2 8
9
Software engineering cycle phases Requirements: Client needs Translate these into requirements specification Design: Developers translate requirements to actual product Iterative process Start with broad outline: what’s the overall functionality we need? Break that down into smaller pieces: what modules are needed? What details are needed for each module? How do modules interact? Final result of this stage: design specification Can include Verbal description of design, both at high & low level UML diagrams showing varying levels of detail about project 6/3/20169 ECE 264: Lecture 2
10
Software engineering cycle phases (cont.) Programming: Write the actual code Translate the design spec into language of choice May have multiple programmers handling different modules Integration: Merge modules together The different pieces of software are merged together. Testing is crucial in this phase to ensure the software works and meets all the requirements of the clients. Delivery: Get product to client Client typically conducts acceptance testing to ensure product meets requirements Maintenance: Fix remaining bugs Modify product to meet new requirements 6/3/201610 ECE 264: Lecture 2
11
Testing Testing is key from design stage on Unit testing: does a given module function in the expected manner? You use unit testing every time you debug an individual method, class, etc. Integration testing: do modules fit together? Multiple functions calling one another; compatibility among classes; merging files from different parts of the program System testing: does whole system work together? Acceptance testing: user-designed tests with developer support to ensure product meets requirements Good idea to formulate testing plans in design stage As you determine design spec, think about how you’re going to test your software 6/3/2016 ECE 264: Lecture 2 11
12
Final notes Next time Use case modeling Requirements specifications Introduce C++ basics Acknowledgements: this lecture borrows heavily from lecture slides provided with the following texts: Deitel & Deitel, C++ How to Program, 8 th ed. Etter & Ingber, Engineering Problem Solving with C++, 2 nd ed. 6/3/2016 ECE 264: Lecture 2 12
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.