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

No content

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Assignment 01 Design

Slide 5

Slide 5 text

Code (and Design) Review 5 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 6

Slide 6 text

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

Slide 7

Slide 7 text

Eye Tracking • Tobii Sp a rk https://www.tobii.com/products/eye-trackers/screen-based/tobii-pro-spark • Tobii SDK https://www.tobii.com/products/softw a re/ a pplic a tions- a nd-developer-kits/tobii-pro-sdk 7

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

Brain-Computer Interfaces • Emotiv He a dsets https://www.emotiv.com/ • D a t a S a mples https://emotiv.gitbook.io/cortex-api/data-subscription/data-sample-object 9

Slide 10

Slide 10 text

3. Java Desktop Application He a d Movement 10

Slide 11

Slide 11 text

4. Java Desktop Application Cobot Simul a tor 11

Slide 12

Slide 12 text

Cobot • Univers a l Robotics e-Series https://www.universal-robots.com/media/1802432/e-series-brochure.pdf • Comm a nds th a t c a n be used https://s3-eu-west-1.amazonaws.com/ur-support-site/29983/Script command Examples.pdf 12

Slide 13

Slide 13 text

5. Java Desktop Application Hub 13

Slide 14

Slide 14 text

Quality Metrics Structural

Slide 15

Slide 15 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) 15

Slide 16

Slide 16 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). 16

Slide 17

Slide 17 text

Distance 17 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 18

Slide 18 text

Example 18 Write the Source Code

Slide 19

Slide 19 text

Publisher-Subscriber MQTT

Slide 20

Slide 20 text

Message Queuing 20

Slide 21

Slide 21 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 21

Slide 22

Slide 22 text

https://github.com/CSC3100/MQTT

Slide 23

Slide 23 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. 23

Slide 24

Slide 24 text

https://github.com/CSC3100/MQTT

Slide 25

Slide 25 text

Assignment 02 Coding

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

Questions 27

Slide 28

Slide 28 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.