Slide 1

Slide 1 text

Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info o ffi ce: 14 -227 CSC 305 Individual Software Design and Development Lecture 03. Object-Oriented Design

Slide 2

Slide 2 text

Week 01 2 ✅ Clean Code

Slide 3

Slide 3 text

TicTacToe

Slide 4

Slide 4 text

Parts 4 Engine (Br a in) M a in View (I/O) Bo a rd (D a t a ) Pl a yer (Controller)

Slide 5

Slide 5 text

M a in

Slide 6

Slide 6 text

View (I/O)

Slide 7

Slide 7 text

Bo a rd (D a t a )

Slide 8

Slide 8 text

Engine (Br a in)

Slide 9

Slide 9 text

Pl a yer (Controller) https://github.com/CSC3100/Game-TicTacToe

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Diagram

Slide 12

Slide 12 text

Design 12 VS

Slide 13

Slide 13 text

Error Smells 13 ✅ ❌

Slide 14

Slide 14 text

UML Diagrams 14

Slide 15

Slide 15 text

Relationships 15

Slide 16

Slide 16 text

Level of Abstraction 16 https://faculty.runi.ac.il/arik/site/Clipasso.asp

Slide 17

Slide 17 text

Hints 17 ✅ ✅ ✅ ❌ ❌ 🤔

Slide 18

Slide 18 text

Hints 18 ✅

Slide 19

Slide 19 text

Questions 19

Slide 20

Slide 20 text

Lab

Slide 21

Slide 21 text

Problem 21 public class B implements E { public B() C c1 = new C(); } public void method(A a) { B b = new B(); b.sleep(); a.method(new D()); } } public class Y extends B { A [] a = new A[5]; } public class A extends B { C c1, c2; public A() { c1 = new C(); } public void method(D d) { d.working(); } } public class X { private String s; public void m() { B var = new A(); double x – Math.sqrt(5); } }

Slide 22

Slide 22 text

CSC 305 Individual Software Design and Development Javier Gonzalez-Sanchez, Ph.D. [email protected] Fall 2025 Copyright. These slides can only be used as study material for the class CSC305 at Cal Poly. They cannot be distributed or used for another purpose.