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
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.
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
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
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
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
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
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
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
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]
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
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.