Slide 1

Slide 1 text

Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info o ffi ce: 14 -227 CSC 508/9 Software Engineering (Design & Deployment) Lecture 09. Structural Quality

Slide 2

Slide 2 text

Assignment 01 Design

Slide 3

Slide 3 text

Code (and Design) Review 3 https://github.com/javiergs/ADASIM • Draw the class diagram. • Then make a table listing all class names and, for each class, answer the following: • (1) Does it have a single responsibility, and if so, which one? (2) Is the class or interface necessary? (3) Is it part of the view, model, or controller? (4) If it is a blackboard, is its design and usage correct? (5) If there is an issue(code or design), explain and suggest a possible solution.

Slide 4

Slide 4 text

1. Java Desktop Application Eye Tr a cking Simul a tor (size, speed) 4

Slide 5

Slide 5 text

2. Java Desktop Application A ff ect Recognition (speed) 5

Slide 6

Slide 6 text

3. Java Desktop Application He a d Movement 6

Slide 7

Slide 7 text

4. Java Desktop Application Cobot Simul a tor 7

Slide 8

Slide 8 text

5. Java Desktop Application Hub 8

Slide 9

Slide 9 text

Quality Metrics Structural

Slide 10

Slide 10 text

Abstractness • Indic a tes whether: ( a ) the item is m a inly a bstr a ct (interf a ces, a bstr a ct cl a sses – extensible but not directly us a ble); or (b) it is m a inly concrete (implement a tions – directly us a ble but less extensible). • It is a v a lue between 0 a nd 1: 0 ( a concrete cl a ss or a p a ck a ge with only concrete cl a sses) 1 ( a n a bstr a ct cl a ss/interf a ce or a p a ck a ge with only a bstr a ct cl a sses/interf a ces) 10

Slide 11

Slide 11 text

Instability • Indic a tes whether: ( a ) the item is m a inly used by others (st a ble – h a rd to ch a nge); or (b) it m a inly depends on other items (in-st a ble – ch a nge a ble). • It is a v a lue between 0 a nd 1: • 0 only incoming dependencies to • 1 (only outgoing dependencies). 11

Slide 12

Slide 12 text

Distance 12 Abstract Concrete Stable Hard to Change Only incoming dependencies Unstable Changeable Only outgoing dependencies the main sequence Painful Useless 0 1 1 0 Instability Abstractness

Slide 13

Slide 13 text

Example 13 Write the Source Code

Slide 14

Slide 14 text

Publisher-Subscriber MQTT

Slide 15

Slide 15 text

Message Queuing 15

Slide 16

Slide 16 text

Eclipse Paho for Java Wh a t is Eclipse P a ho? • A set of MQTT client libr a ries developed by the Eclipse Found a tion. • It supports multiple l a ngu a ges, such a s J a v a , Python, J a v a Script, etc. J a v a Dependency (M a ven) org.eclipse.paho org.eclipse.paho.client.mqttv3 1.2.5 16

Slide 17

Slide 17 text

https://github.com/CSC3100/MQTT

Slide 18

Slide 18 text

Quality-of-service options • 0 – "at most once": A.K.A. "fire-and-forget." This option is suitable when message loss is acceptable, as it doesn't require acknowledgment or persistence. • 1 – "at least once": This option should be chosen when message loss is unacceptable, and your subscribers can handle duplicate messages. • 2 – "Exactly once": This option is ideal when message loss is unacceptable, and your subscribers cannot handle duplicate messages. 18

Slide 19

Slide 19 text

https://github.com/CSC3100/MQTT

Slide 20

Slide 20 text

Assignment 02 Coding

Slide 21

Slide 21 text

Pong 21 https://github.com/CSC3100/Pong-Game

Slide 22

Slide 22 text

Metaverse 22

Slide 23

Slide 23 text

Questions 23

Slide 24

Slide 24 text

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