jgs CSC 309 Software Engineering II Lecture 10: Pair Programming II Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 3 • Consistent communication • Switch roles • Pair up carefully (select your pair). • A familiar development environment • Work at a pace that fits both developers. So, best practices
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 5 1. Read a File and Split the lines 2. For each line read character by character 3. Concatenate characters, creating the largest STRING possible. Stop when a delimiter, white space, operator, or quotation mark is found. If there are more characters in the line, go to step 2. 4. Bonus points: for each STRING report its TYPE as correspond. E.g., class is a keyword, { is a delimiter, hello is a name (identifier), Student is a name (identifier), + is an operator, extends is a keyword, etc. Part 1
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 10 class Student extends Person{ Hello world; } Case 3 Input: You have 3 classes. Classes: * Student * Person * Hello Methods: Relationships: * Student has a Hello * Student is a Person Output:
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 11 class Student extends Person{ Hello world() { } } Case 4 Input: You have 2 classes. Classes: * Student * Person Methods: * world Relationships: * Student is a Person Output:
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 14 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 10: Pair Programming Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.com Building 14 -227 Office Hours: By appointment
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 17 Think about this 1. Select your pair 2. Understand the task (described before) 3. Chose and set up your environment 4. Be ready to work
jgs Javier Gonzalez-Sanchez | CSC 309 | Winter 2023 | 18 § Interface declaration § Class declaration § Inheritance (from 1 class) § Realization (implements) from multiple interfaces § Variables global § Variables global (that are not null) § Methods § Variables Local § Call methods (using an abject or class name) Task Assume a good user that never never never make mistakes. Thus, it is not going to extends from an interface or implements from a class
jgs CSC 309 Software Engineering II Javier Gonzalez-Sanchez, Ph.D. [email protected] Winter 2023 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.