Software Development

UML Class Diagrams: An Example

UML Class Diagrams: An Illustration

This week's post provides an illustration of the use of UML class diagrams.  Class diagrams can be constructed for just about any object because all objects have attributes and behaviors.

The Iowa Department of Transportation (see Iowa.Gov, 2019) uses kiosk machines to facilitate transactions such as driver's license renewal, address change, and the opportunity to obtain replacement or updated identification cards.

Putting the Diagram Together ...

Attributes (fields) and Behaviors (methods)

The UML diagram includes seven private fields and nine class methods.  Three of the methods, scanLicense(), takePhoto(), and getRequestedService() must be completed successfully for the machine to create an instance with the required data including license number, personal information, and a photo taken while standing at the kiosk.  The users identity is verified with facial recognition through the photoVerification() method using the image taken as input and providing a boolean (true or false) confirming or denying the kiosk user’s identity.  Once the information is complete and the user’s identity has been verified, appropriate methods exist to completed the requested service including license renewal, replacement ID cards, and updated ID cards.  Each of the methods for these services produces a String which is passed to the program, updated to the driver’s database record, and printed on a new license at the kiosk machine.

UML Class Diagram: Iowa DOT Kiosk
-          licenseNumber: String
-          requestedService: String
-          facialPhoto: Image
-          fullName: String
-          fullAddress: String
-          phoneNumber: String
-          emailAddress: String
+        scanLicense(): String
+        takePhoto(): Image
+        getRequestedService(): String
+        photoVerification(Image facialPhoto): boolean
+        licenseRenewal(): String
+        replacementCard(String requestedService): String
+        updateCardAge(): String
+        updateCardAddress(): String
+        replacementCard(String requestedService): String

References

Iowa.Gov. (2019, February 6). Motor Vehicle Kiosks. Retrieved from Iowa.Gov: https://iowadot.gov/mvd/kiosks

 

Leave a Reply