Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CSC309 Lecture 20

CSC309 Lecture 20

Software Engineering II
Final Review
(202306)

Javier Gonzalez-Sanchez

February 28, 2023
Tweet

More Decks by Javier Gonzalez-Sanchez

Other Decks in Programming

Transcript

  1. jgs CSC 309 Software Engineering II Lecture 20: Final Exam

    Review Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
  2. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    2 Key Ideas CSC 309 idea requirements architecture design code unit testing integration testing system testing operation validation validation verification verification quality measure
  3. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    3 1. Metrics 2. Coverage 3. Clean code and Clean Design 4. Pair Programming 5. Junit 6. GitHub Issues and Task-boarding 7. Continuous Integration 8. Maven and GitHub Actions 9. Cost estimation (do not forget the cost factors) Key Topics
  4. jgs The following slides show some examplesrelated to some topics

    This is NOT a comprehensive list of topics. Topics in the exam include ALL lecture slides.
  5. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    6 § Independent – loosely coupled with one another § Negotiable – Stories are what and why , not how ( 99% ). § Valuable – for the customer! § Estimatable – Effort/Cost of design, build, and test. § Small (sized appropriately) § Testable – pass or fail INVEST in good requirements
  6. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    13 1. Class Diagram Note: There are 3 classes and 1 interface Case 2
  7. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    14 § Students and Staff members can request the Library to notify him/her when a Book becomes available. § Also, they can reserve the book. Before reserving a Book for someone the Library check, for students, with the Registrar, if the Student is currently enrolled, and for employees, with Human Resources if the employee has an active contract. Case 3
  8. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    15 § Students and Staff members can request the Library to notify him/her when a Book becomes available. § Also, they can reserve the book. Before reserving a Book for someone the Library check, for students, with the Registrar, if the Student is currently enrolled, and for employees, with Human Resources if the employee has an active contract. Case 4
  9. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    17 Metrics § LOC § eLOC § lLOC § Cyclomatic complexity (Max, Min, Average) Testing § Statement coverage § Decision coverage Questions
  10. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    20 Given a Date class with the following methods: opublic Date(int year, int month, int day) opublic Date() // today opublic int getDay(), getMonth(), getYear() opublic void addDays(int days) // advances by days opublic int daysInMonth() opublic String dayOfWeek() // e.g. "Sunday" opublic boolean equals(Object o) opublic boolean isLeapYear() opublic void nextDay() // advances by 1 day opublic String toString() § Come up with unit tests to check the following: oThat no Date object can ever get into an invalid state. oThat the addDays method works properly. • It should be efficient enough to add 1,000,000 days in a call. JUnit
  11. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    21 public class DateTest { @Test public void test1() { Date d = new Date(2050, 2, 15); d.addDays(4); assertEquals(2050, d.getYear()); // expected assertEquals(2, d.getMonth()); // value should assertEquals(19, d.getDay()); // be at LEFT } @Test public void test2() { Date d = new Date(2050, 2, 15); d.addDays(14); assertEquals("year after +14 days", 2050, d.getYear()); assertEquals("month after +14 days", 3, d.getMonth()); assertEquals("day after +14 days", 1, d.getDay()); } // test cases should usually have messages explaining } // what is being checked, for better failure output Junit + Coverage
  12. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    26 § What? The practice of automating the integration of code changes from multiple contributors into a single software project. Continuous Integration (CI) https://www.pagerduty.com
  13. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    28 § Which One? Money, Experience, Learning Curve Jenkins, Travis, and CircleCI have been popular options. Tools Build Test Report
  14. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    32 Office Hours Tuesday and Thursday 3 - 5 pm But an appointment required Sent me an email – [email protected]
  15. jgs

  16. jgs CSC 309 Software Engineering II Lab 20: Work in

    Your Project Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
  17. jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 |

    35 Let’s Work Work on Your Final Project
  18. jgs CSC 308 Software Engineering I Javier Gonzalez-Sanchez, Ph.D. [email protected]

    Fall 2022 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.