SEARCH RESULTS
88 results found with an empty search
- Building a "Hello Android" App: A Reflection on Learning Kotlin and Android Development
This article documents the author's first experience developing an Android application using Kotlin and XML, detailing the creation of a "Hello Android" app that features a bouncing text animation and a toggle button to control it. The author reflects on the challenges of learning Kotlin, understanding the Android project structure, connecting UI elements to code, and implementing a background thread for the animation, providing a beginner's perspective on fundamental Android development concepts. Alexander S. Ricciardi February 24, 2025 Learning platform-based application development is not an easy endeavor. In this article, I reflect on my first exposure to Android app development using Kotlin and XML, providing an overview of a simple "Hello Android" application. I describe the application's functionality and testing scenarios, including the pseudocode, Kotlin code, and output screenshots. I also reflect on the obstacles faced during development and the skills I acquired. App Description The app is a simple Hello Android Application written in Kotlin. It displays a simple animation where a TextView ("Hello Android!") bounces around within the screen's boundaries. It also provides a toggle button allowing the user to stop and restart the text animation. Additionally, the program uses a background thread to run a text animation within an infinite loop. This loop updates the TextView's position and, when hitting a screen boundaries, the text bounces and changes color. This ‘hands-on’ animation approach is implemented for learning purposes, it is generally better and good practice to use Android API’s built‑in animation classes (like those in AnimationUtils). Furthermore, to initialize the application, I used the Empty View Activity Template from Android Studio. Then I modify the files to implement the text animation and my icon. The source code files for this application can be found on my GitHub page in the following repository Module-1-Critical-Thinking . The app was developed using the Android Studio IDE (Integrated Development Environment). Project Map: CTA1 Hello Android App.docx (this file, App documentation) MainActivityPseudo.txt (Main Activity pseudocode) The project used files from the Android Studio’s Empty View Activity template. Additionally, only the template files that were modified to accommodate the functionality of the application are listed below: MainActivity.kt (Kotlin code, application logic) Main_activity.xml (XML code, main UI layout) Value string.xml (resource file storing strings) The following files have been overridden or modified to accommodate my icon. If you do not want to use my logo, do not use these files. The template will automatically use the Android icon. Value color.xml theme.xml (this file was not modified or overridden, but it is part of the value folder) drawable ic_launcher_background.xml ic_launcher_foreground.xml mipmap-anydpi-v26 ic_launcher.xml ic_launcher_round.xml mipmap folders (hdpi; mdpi; xhdpi; xxhdpi; xxxhdp – different variation of my icon) Reflection This is my first time using Kotlin and Android Studio to create a program. Installing Android Studio was straightforward. Learning about Kotlin from the textbook and doing research about it was rewarding. The following is an overview of Kotlin based on what I have learned from the textbook and my research. Kotlin is often described as the most succinct language, meaning that is the least error-prone programming language (Horton, 2019). Android SDK (Software Development Kit) is written in Java. Moreover, Kotlin is fully interoperable with Java, meaning that Java libraries and frameworks can be easily integrated into Kotlin code, and Java projects also can be easily migrated to Kotlin. It is an Object-Oriented Programming language (OOP). It includes null safety, preventing null pointers. It allows function extensions, that is adding functionality to existing classes without modifying their source code. It allows data classes which are classes primarily used to hold data. It can implement coroutines, making asynchronous programming much easier such as handling network requests. (Ricciardi, 2025) Furthermore, it is generally preferred for Android app development over programming languages like C++ and Java. The table below lists some of the advantages Kotlin has over C++ and Java. Table 1 Kotlin’s advantages over C++ and Java Note: The table lists the advantages that Kotlin has over C++ and Java when developing Android based Apps. From “Why Kotlin is preferred for Android app development” by Ricciardi (2025). As described previously, I chose to create a “Simple Hello Android APP” by modifying the Empty View Activity Template from Android Studio and implementing a background thread to run a text animation within an infinite loop. This loop updates the TextView's position and, when the text hits a screen boundary the text bounces and changes color. This was done to practice implementing variables and loops using Kotlin. Kotlin Variables Handling Kotlin uses type inference, type check, and smart-cast, meaning that, when type referring, the compiler automatically deduces the data types of variables and expressions, eliminating the need for explicitly declaring variable types (App Dev Insights, 2023). Type checks are performed in two ways by using the ‘is’ operator and its negation ‘!is’. These operations return a Boolean, that is return true if the condition is met. For example, if a variable ‘is’ of the data typed checked the condition will return true if not it will return false. Smart-cast allows the compiler to cast a variable to a specific type within a code block, without the need for explicit type checks and casts; for example, ' print(x.length) // x (a string) is automatically cast to String '. Furthermore, Kotlin uses two different keywords to declare variables, ‘val’ and ‘var’ (Developers, n.d.). ‘val’ is used to declare static variables, variables that never change, and ‘var’ is used to declare non-static variables, variables whose value can change. Kotlin's syntax is very similar to Java, and transitioning from Java to Kotlin for this assignment was traits forward. The part that was most challenging for me was learning the Android Project Structure, that is how the project files are interconnected using the Android Manifest file and Gradle build configurations My Android Project File Structure Learning my project file structure dependencies was essential for me to understand how different parts of the application interact and to implement a functional code. Below is a breakdown of the key components and their description: Figure 1 Hello App Structure on Android Studio Note: The figure illustrates the Hello App file structure in Android Studio. Note that the MainActivity.kt and activity_main.xml are the core files of the application. The MainActivity.kt file contains the Kotlin source code dictating the logic for the application, in this example the logic for the bouncing text background animation thread and the toggle button. The activity_main.xml contains the XML code that defines the user interface layout, including the TextView for the " Hello Android! " text and the ToggleButton . The ic_launcher files have been modified or overridden to accommodate my personal icon. The color.xml file has been modified to integrate a color background for my icon. The strings.xml file has been modified to store the ToggleButton text describing its state and the bouncing_text (“ Hello Android !”) Pseudocode and Koltin Code Implementing the animation of the bouncing text was not very difficult as I had implemented this functionality in other programming languages, more specifically Java and Python. The most difficult part was understanding how to get the elements from the UI so they could be integrated into the application logic ( MainActivity.kt ). The Android environment uses ‘id’ to accomplish it. For example, to get the size of the screen (‘ View ’) to set the boundaries of the text animation, I use the ‘ id ’ of the element ‘View’ from the activity_main.xm l layout file after I imported it and set it as the application content view using this following line of code ' setContentView(R.layout.activity_main)' Below is a Kotlin code snippet demonstrating how this process is done: Code Snippet 1 Using Ids to Connect Logic and UI // Set content view, the UI from the activity_main.xml layout file setContentView(R.layout.activity_main) // Layout's views attribute from activity_main.xml layout file val container = findViewById( R.id .main) // The root container (ConstraintLayout) // The TextView that will bounce val textView = findViewById( R.id .bouncingText) // Button to start/stop the animation val toggleButton = findViewById( R.id .toggleButton) Note: The Kotlin code snippet illustrated how UI (layout) and Logic are connected using ids. This code is part of the onCreate function. The other challenging part was understanding the functionality of the ' ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main))' method within the onCreate function, to keep it simple, the code functionality avoids overlaps between window insets (UI element of the app behind system elements) with system UI elements (e.g. Status Bar, Navigation Bar). If the app's content overlaps with the system UI elements, it can lead to poor user experience. Figure 2 Main Activity Pseudocode Note: The figure illustrates a snapshot of pseudocode implementing the logic of a text view bouncing and changing color within a container (presumably a screen). The animation runs in a background thread. Additionally, the code implements a toggle button to stop and restart the animation. Furthermore, this pseudocode was created with an Android application perspective in mind and is intended to be translated into Kotlin. Please see MainActivityPseudo.txt file, the complete code here: Module-1-Critical-Thinking . Figure 3 Main Activity Kotlin (MainActivity.kt) Note: The figure illustrates a snapshot of Kotlin code implementing the logic of a text view bouncing and changing color within a container (a screen). The animation runs in a background thread. Additionally, the code implements the logic of a toggle button to stop and restart the animation. Please see MainActivity.kt file , the complete code here: Module-1-Critical-Thinking . Code Snippet 4 Main Activity XLM Layout UI (main_activity.xml) ========================================================================== This file is a resource file written in XML that defines the user interface layout, including the TextView for the "Hello Android!" text and the ToggleButton. It is part of the Simple Hello Android App Author: Alexander Ricciardi Date: 02/14/2025 Requirement: Kotlin and XML Program Description: This is a simple Hello Android Application written in Kotlin. It displays a simple animation where a TextView ("Hello Android!") bounces around within the screen's boundaries. It also provides a toggle button allowing the user to stop and restart the text animation. ========================================================================== --> Note: The XML snippet illustrates the UI layout of the application. Please also see main_activity.xml file for the code. To connect the elements from the UI, this file (main_activity.xml), to the application logic, Android uses elements’ ‘ids ’; for example the ‘TextView’ element as an ‘id’ associated with ‘ bouncingTex t’ as illustrated by the following code lines: Figure 4 Connecting Variables Note : The figures illustrate how variables interconnect within the Andriod ecosystem. Screenshots This section demonstrates the output of the applications using GIF format images. Figure 5 Bouncing Text and Toggle Button Note: The figure GIF animation depicts the ‘ Hello Android! ’ text bouncing and changing color, from black to dark green after bouncing off the edge of the screen. It also depicts the user clicking on the toggle button to stop and restart the animation. Note that the button text all changes from ‘ Stop Animation ’ to ‘Start Animation ’ when first clicked and then from ‘ Start Animation ’ to ‘ Stop Animation ’ when clicked again. Figure 4 Icon and Home Buttons Note: The figure GIF animation depicts a user using the ‘Home’ and the application icon buttons. Note that the animation seems not to be fluid, this is due to the GIF animation looping, not the application animation itself. Summary The "Simple Hello Android App" project provided me with a good foundation for understanding Android development using Kotlin and XML. The process of creating the bouncing text animation and the toggle button helped me to become more familiar with Kotlin, how it is used to implement the application logic (MainActivity.kt), and how it interconnects with the XML UI design (using ConstraintLayout, TextView, and Button in activity_main.xml), and the application resources (e.g. strings.xml). Understanding the Android project structure, connecting UI elements to Kotlin code via resource ‘ids’, and managing a background thread for animation, were the most challenging parts of the project. Ultimately, the project provided me with a solid grasp of fundamental Android concepts and its ecosystem. References: App Dev Insights. (2023, December 16). Kotlin Type inference, Type check, Smartcast - App Dev Insights . Medium. https://medium.com/@appdevinsights/kotlin-type-inference-type-check-smartcast-49c5f98fac1b Developers (n.d.). Learn the Kotlin programming language. Android. https://developer.android.com/kotlin/learn Horton, J. (2019). Android programming with Kotlin for beginners. Packt Publishing. ISBN: 9781789615401 Ricciardi, A. (2025, February 14). Why Kotlin is preferred for Android app development . Level Up Coding │ Medium. https://medium.com/gitconnected/why-kotlin-is-preferred-for-android-app-development-c1d8f10ad95c
- Beyond Bits: Exploring the Quantum Frontier and its Impact on AI
This article examines the recent advancements in quantum computing, specifically Google's Willow and Microsoft's Majorana 1 Quantum Processing Units (QPUs), and explores the profound impact that the combination of quantum computing and AI will have on society, including potential benefits and risks. Alexander S. Ricciardi February 24, 2025 In the era of AI, quantum computing can be as transformative a technology as AI itself. Google introduced the Willow quantum processor in December 2024 and Microsoft's Majorana 1 topological chip in February 2025. Both chips are Quantum Processing Units (QPUs); however, their approaches to quantum computing differ significantly. Whatever quantum computing technology comes to dominate in the near future, the combination the AI and quantum computing technologies will bring about an era reminiscent of science fiction movies that will have a profound transformative impact on humanity. This sparks today, a mix of extreme excitement and deep concerns. Although quantum computing combined with AI offers the potential for unprecedented positive technological advancements, it can also lead to very serious negative consequences. This is a reminder of the tension that can exist between the "can do" of science and engineering and the "should do" of ethical and political analysis (Winston & Edelbach, 2014). This post provides an overview of quantum computing, examines Google's Willow and Microsoft's Majorana 1 Quantum Processing Units (QPUs), discusses the benefits and risks of quantum computing, especially when combined with artificial intelligence (AI), and explores the ethical questions "can do" versus "should do" regarding these technologies. Overview of Quantum Computing Quantum computing uses the quantum mechanics superposition and entanglement principles to perform computations. Unlike classic computing which uses bits (1s and 0s) to encode information, quantum computing uses qubits (0s, 1s, and superposition). Bits represent two possible states of a system ‘1’ and ‘0’ (Microsoft, n.d.a). On the other hand, qubits represent the possible quantum states of a system, and a quantum system can be in three different states one of them is superposition which allows a quantum system to exist in multiple states simultaneously. In other words, a qubit can be in a superposition of 0 and 1, allowing multiple computations in parallel by processing all possible states of the qubits at once. This will allow, theoretically, to compute answers to problems that would be impossible to solve using even the most powerful supercomputers that humanity could ever build (Domain of Science, 2024). However, quantum chips are very vulnerable to noise which generates errors in qubits. Before the Willow and Majorana 1 QPU chips noise was the obstacle to achieving reliable quantum computation. Both chips address the noise problem, each using its own approach. While Google Willow's approach focuses on error correction, using a combination of software and hardware, to mitigate the noise and decoherence, Microsoft's Majorana 1’s approach uses quantum topology to resist noise and decoherence at the chip level by using a novel topoconductor material. Google labels the Willow chip as an experimental device, while Microsoft describes the Majorana 1 as a prototype with the potential to scale to a million qubits on a single chip,` claiming that the first fully functional quantum computer would be a reality within a few years. The table below compares the features of the chip and their error rates. Table 1 Willow Features vs Majorana 1 Note: The table compares the different features and error rates of the Willow QPU from Google and Majorana 1 QPU from Microsoft. From several sources (Nayak, 2025; Domain of Science, 2024; Trueman, 2025; Microsoft, 2025b) As shown in Table 1, both chips are state-of-the-art; however, Microsoft’s Majorana 1 appears to have an advantage due to its topological design, which provides more stability, scalability, and error resistance and has the potential to be implemented within a fully functional quantum computer within a few years rather than a decade. Benefits of Quantum Computing and Impact on AI Once fully functional quantum computers become a reality, they will transform various fields and elevate AI capacities to levels impossible to imagine, unveiling possibilities beyond what we can currently comprehend. For example, quantum computers can simulate with ease molecular behavior and biochemical reactions which when combined with AI could massively speed up the research and development of life-saving new drugs and medical treatments. For a similar reason, it could immensely accelerate the discovery of new materials such as advanced composites, superconductors, etc. revolutionizing industries like energy, manufacturing, and environmental science. They could have a considerable impact on AI research and training by accelerating training runs and optimization, enhancing model complexity and creativity, and improving the robustness and generalization of the AI model (Fowler, 2024). As well as improving data processing for AI training, enhancing encryption and security within AI applications, and combining quantum computing with neural network architectures (Kiessling, 2024; Quantinuum, 2025) Quantum Computing Risks and Ethical Issues However, quantum computing also raises several risks and ethical issues such as data security and cybersecurity which are already an issue due to the "harvest now, decrypt later" attack, where malicious actors collect encrypted data today with the intention of decrypting it later when quantum computers become available (Bown, n.d.). Additionally, quantum computing could exacerbate inequities between rich and poor countries by limiting access to advanced computing power (Boger, n.d.). Moreover, it could bring into existence AI systems so powerful that they could outsmart humans, potentially leading to a complete loss of control and even posing an existential risk to humanity. "Can Do" and "Should Do" Both Google’s Willow chip and Microsoft’s Majorana 1 chip promise to bring immense benefits to humanity and they exemplify the "can do" spirit of scientific research, technological innovation, and engineering, sitting at the boundary of humanity’s understanding, knowledge, and technological capabilities. However, the ethical "Should do" question arises: should humanity develop such technology that, if combined with AI, could bring catastrophic consequences like loss of control and existential risk? This ethical question cannot be answered without considering its geopolitical counterpart: "Should we develop such technology and combine it with AI, knowing that if we do not, someone else will anyway? In the technological AI/Quantum Computing race in which the US and China are locked, the countries perceive the "Should do" statement not as a question with a choice but as a must driven by national security and global dominance. References: Boger, Y (n.d.). Ethics and quantum computing. Scientific Computing World. https://www.scientific-computing.com/article/ethics-quantum-computing Brown, L. (n.d.). Understanding quantum risk: The threats posed by quantum computing. GRC Viewpoint. https://www.grcviewpoint.com/understanding-quantum-risk-the-threats-posed-by-quantum-computing/ Chamber, A. (2025, February 20). Microsoft unveils Majorana 1, its first quantum processor chip. Technology Record. https://www.technologyrecord.com/article/microsoft-unveils-majorana-1-its-first-quantum-processor-chip Domain of Science (2024, May 13). Microsoft's Topological quantum computer explained [video]. YouTube. https://www.youtube.com/watch?v=ihZXl33t8So&t=17s Fowler, G. (2024, May 14). How quantum computing will impact generative AI. Medium. https://gafowler.medium.com/how-quantum-computing-will-impact-generative-ai-779ba190cf18 Kiessling, C. (2024, December 20). Quantum computing and AI – A superpower in the making? Roland Berger. https://www.rolandberger.com/en/Insights/Publications/Quantum-computing-and-AI-A-superpower-in-the-making.html Microsoft (n.d.a). Superposition . Explore quantum. https://quantum.microsoft.com/en-us/insights/education/concepts/superposition Microsoft (2025b, February 19). Microsoft’s Majorana 1 chip carves new path for quantum computing . Microsoft. https://news.microsoft.com/source/features/innovation/microsofts-majorana-1-chip-carves-new-path-for-quantum-computing/ Nayak, C. (2025, February 19). Microsoft unveils Majorana 1, the world’s first quantum processor powered by topological qubits. Microsoft. https://azure.microsoft.com/en-us/blog/quantum/2025/02/19/microsoft-unveils-majorana-1-the-worlds-first-quantum-processor-powered-by-topological-qubits/ Neven, H. (2024 December 9). Meet Willow, our state-of-the-art quantum chip. Google Blog. https://blog.google/technology/research/google-willow-quantum-chip/ Quantinuum (2025, January 22). Quantum computers will make AI better. Quantinuum. https://www.quantinuum.com/blog/quantum-computers-will-make-ai-better Spinq (2024, December 18). Meet Willow, Google's latest breakthrough in quantum chip. Spinq. https://www.spinquanta.com/newsDetail/92ad47a1-99c1-4e01-a8ee-0074c42d9384 Trueman, C, (2025, February 15). Google CEO: Practical quantum computers likely still a decade away. DCD. https://www.datacenterdynamics.com/en/news/google-ceo-practical-quantum-computers-likely-still-a-decade-away/ Winston, M., & Edelbach, R. (2014). Society, ethics, & technology (5th ed.) . Wadsworth Cengage Learning.
- Addressing Common Challenges in Complex Android UI Design with Jetpack Compose
This article compares XML and Jetpack Compose for building Android UI layouts, it also explores the challenges of designing complex UIs and how Jetpack Compose's declarative approach and Kotlin-based toolkit offer more efficient solutions. Alexander S. Ricciardi February 22, 2025 In the context of Android app development, designing complex layouts presents a set of common challenges. This is true when using both XML and Jetpack Compose. Google’s parent company, Alphabet, owns Android, and Google manages it as a subsidiary. Google acquired Android in 2005 for just $50 million (Reynolds, 2017). Since then, Google has invested heavily in Android and guided the evolution of its ecosystem, making it the most popular mobile system in the world. This post provides a brief overview of Jetpack Compose and explores common challenges one can face when designing complex layouts in Jetpack Compose. Jetpack Compose Overview XML (Extensible Markup Language) has been the cornerstone of Android UI design since its early days in 2008 (Angelo, 2024). XML is a markup language used to structure and organize data, it supports information exchange between computer systems such as websites, databases, and third-party applications (AWS, n.d.). In the Android ecosystems, it is used to define User Interface (UI) layouts and elements. Developers use XML to specify the arrangement of buttons, text views, images, and other UI components. However, since declaring Kotlin the official programming language for Android app development in 2017, Google endorsed Jetpack Compose, a toolkit written in Kotlin, as the preferred solution for building complex Android app UIs, starting in early 2019 (Samojło, 2024; Angelo, 2024). See Table 1 for a list of the main differences between XML and Jetpack Compose. Table 1 XML vs Jetpack Compose Note: The table lists the main differences between XML and Jetpack Compose. From “XML vs. Jetpack Compose: A Comparison” by Angelo (2024) Compose toolkit is part of the Android Jetpack developer library from Google, a suite of toolkits that are used to create and manage UI, manage data, schedule background tasks, and more. The toolkit uses a declarative programming paradigm (Android Developers, n.d.a). This means that developers describe what your UI should contain, and the Jetpack Compose toolkit does the rest not needing to write anything in XML, everything is done through Kotlin code (Android Developers, 2022b). Compose layouts are built using Kotlin composable functions, which are functions that emit Units describing elements of a UI (Android Developers, n.d.c). In Kotlin, a Unit is a type that represents no meaningful value, similar to void in Java or C++. Additionally, Almost everything in Compose is a Layout such as Box, Column, Row, and BoxWithConstraints. The examples below illustrate how to use a Compose basic function and the Column Layout. Code Snippet 1 A Basic Composable Function - Kotlin @Composable fun ArtistCard() { Text("Alfred Sisley") Text("3 minutes ago") } Output Note: The code Snippet is an example of a basic Kotlin composable function. From “Compose layout basics” by Android Developers (n.d.c). Code Snippet 2 A Basic Composable Function Using A Column Layout - Kotlin @Composable fun ArtistCardColumn() { Column { Text("Alfred Sisley") Text("3 minutes ago") } } Output Note: The code Snippet is an example of a basic Kotlin composable function using a Column Layout. From “Compose layout basics” by Android Developers (n.d.c). Note that just by adding the @Composable annotation the compiler will treat the following function as a Composable function, and by encapsulating the Text element within the Column Layout, the text outputs automatically aligned vertically. The same code in XML and Kotlin could be the following: Code Snippet 3 Compose Code Translated to Kotlin and XML Kotlin: import android.os.Bundle import androidx.appcompat.app.AppCompatActivity class ArtistCardColumnActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.artist_card_column) } } XML: Note: The XML and Kotlin code snippets are the translations of the Compose code from Code Snippet 2. Note that just by adding the @Composable annotation the compiler will treat the following function as a Composable function, and by encapsulating the Text element within the Column Layout, the text outputs automatically aligned vertically. This shows one of the reasons why Jetpack Compose is generally preferred over XML as it is less verbose. However, XML integrates with Java and C++, whereas Jetpack Compose is exclusively Kotlin-based, so it’s important to consider the application’s needs when choosing between these two approaches. Additionally, large applications are more likely to adopt a hybrid approach, using both XML and Jetpack Compose; for example, an AAA or AA mobile video game is most likely to combine Kotlin, Java, and C++ with both XML and Jetpack Compose for UI/UX. Common challenges When Designing Complex Layouts ꟷ Jetpack Compose Whether using XML or Jetpack Compose within an Android application or a PC desktop application for that matter, designing complex UI/UX layouts has common challenges. Complex UIs/UXs need to balance functionality with usability, making the task of designing layouts a daunting one. Nonetheless, developers need to understand what those challenges are and how to address them. The table below is the results of my research on the matter, it lists the most common challenges in designing UI/UX and general solutions for any app and specific solutions for those built with Jetpack Compose. Table 2 Challenges and Solutions for Designing Complex App Layouts with Jetpack Compose Note: The table provides a list describing the most common challenges in designing UI/UX their general solutions for any app and specific solutions for those built with Jetpack Compose. From several sources (TechAffinity, 2023; Blair, 2024; Sakthivel, 2022, Android Developers, n.d.d). As shown in Table 1, Jetpack Compose provides modern solutions to common challenges in designing UI/UX, challenges like balancing complexity and simplicity, information overload, navigation difficulty, performance issues, and cross-platform consistency by offering a variated of tools. This affirms Google’s strategy for pushing Jetpack Compose as the ideal tool for building complex UI/UX layouts within the Android ecosystem. To summarize, Jetpack Compose is a powerful tool for Android UI development; it is concise, reactive, and Kotlin-based. Jetpack Compose offers more modern features than XML and is significantly less verbose, saving time, reducing code lines, and minimizing errors. Additionally, it addresses common challenges in designing UI/UX with effective solutions. Overall, Jetpack Compose a well-developed toolkit that reflects Google's vision for Android as a developer-friendly platform meant to guide the future of mobile app design. References: Android Developers (n.d.a). Thinking in Compose. Android. https://developer.android.com/develop/ui/compose/mental-model Android Developers (2022b, September 13). Intuitive: thinking in compose - MAD skills [Video]. YouTube. https://www.youtube.com/watch?v=4zf30a34OOA Android Developers (n.d.c). Compose layout basics. Android. https://developer.android.com/develop/ui/compose/layouts/basics#:~:text=Composable%20functions%20are%20the%20basic,each%20other%2C%20making%20them%20unreadable: Android Developers (n.d.d). Jetpack Compose Tutorial. Android. https://developer.android.com/develop/ui/compose/tutorial Angelo, A. (2024, April 29). XML vs. Jetpack Compose: A Comparison. https://blog.openreplay.com/xml-vs-jetpack-compose--a-comparison/ AWS (n.d.). What is XML? Amazon. https://aws.amazon.com/what-is/xml/#:~:text=Extensible%20Markup%20Language%20(XML)%20lets,might%20give%20suggestions%20like%20these: Blair, I. (2024, September 21). The best app layout ideas for amazing user experience. Buildfire. https://buildfire.com/best-app-layout-ideas/ TechAffinity (2023, March 15). 7 common app design challenges and ways to overcome them. TechAffinity Blog. https://techaffinity.com/blog/7-common-app-design-challenges-and-ways-to-overcome-them/ Sakthivel, K. (2022, April 11). Common app design challenges and their solutions. UXmatter. https://www.uxmatters.com/mt/archives/2022/04/common-app-design-challenges-and-their-solutions.php
- AI's Impact on My Future: Will My Degree Matter?
This article explores the potential impact of artificial intelligence (AI) on industries, highlighting its benefits, drawbacks, and ethical issues. It also examines from a computer science student’s perspective, how AI is reshaping the student’s education paths and possible career choices, by looking at opportunities within the AI-driven gaming sector and using the company Inworld AI as a case study. Alexander S. Ricciardi February 16, 2025 Open AI CEO Sam Altman revealed in a Q/A session at the University of Tokyo (UTokyo) that an internal OpenAI large reasoning model ranks 50th best coder in the world, and he predicted that by the end of 2025, a large reasoning model will rank 1st (UTokyo Center for Global Education, 2025). This article examines the benefits and drawbacks of Artificial Intelligence (AI), and how AI is impacting my education path and future career choices. It also explores career opportunities at a start-up AI company called Inworld AI. The term 'Artificial Intelligence' (AI) was first introduced in 1956 by John McCarthy, a professor at Dartmouth College. He used the term to name a summer workshop, Dartmouth Summer Research Project on Artificial Intelligence, organized to clarify and develop ideas about 'thinking machines' (Science and Technology (DDST), n.d.). Large language models (LLMs) are a type of AI that are trained on massive amounts of text data, they can understand and generate human-like text. LLMs came into the spotlight with the release of the chatbot ChatGPT by OpenAI in November 2022. Since then, the LLMs have evolved into large reasoning models such as o1, DeepSeek R1, and o3, having expert or PhD level capability in mathematics, physics, coding, and other STEM fields. They have also evolved into generative AI models capable of generating realistic images, videos, voices, and music. AI as it stands today is often defined as a transformative technology and a revolutionary force that is redefining numerous industries in the ever-changing landscape of modern technology (Zatzu et al., 2024). The potential for AI to be beneficial to humanity is immense; however, it will also fundamentally reshape how people live and work, presenting potential dangers and ethical issues. The Benefits and Drawbacks of AI – Ethical Concerns The table below lists several benefits as well as drawbacks and dangers of AI. Table 1 AI’s Benefits, Drawbacks, and Dangers Note : The table lists the main benefits, drawbacks, and dangers of AI. From several sources (Rowan University n.d.; St. George University 2024; Takyar, n.d.; Singh, 2025; University of Cincinnati, n. d.; Von Der Osten, 2023; Capitol Technology University, 2023; D’Antonoli, 2020; Thomas, 2024;Virginia Tech Engineer, 2023; Fardian, 2022;Georgieva, 2024) As shown by Table 1, AI has many benefits, as well as many drawbacks. My main ethical concern is how it is already used and will be used in the future to replace human workers. Salesforce, a major SaaS company, announced that in 2025 it will not be hiring any more software engineers amid significant productivity boosts from AI (Martin, 2024). Additionally, by the end of this year, 2025, agentic AI capable of autonomously executing complex tasks, and AGI (Artificial General Intelligence), AI capable of performing any intellectual task that a human being can, are predicted to be available and starting to be deployed. In a society where AI is more efficient, productive, and cheaper than its human counterpart, the potential for widespread job displacement and employment is a very serious concern as well as a serious political and ethical issue. AI Impacts in My Education Path and Future Career Choices I started my journey in computer science education in 2021, before LLM chat boxes like ChatGPT were a thing, meaning before they became available or had an impact. Now, as a senior at Colorado State University Global, I have changed my computer science degree focus from software engineering to a specialization in AI (Artificial Intelligence) and have decided to pursue further my education by pursuing a master's in AI. However, given how fast AI is evolving and how powerful AI systems are becoming, there is a good possibility that by the time I finish my education, my education will not matter as most software applications and potentially many other applications/tasks across many different fields, will likely be designed, implemented, and maintained by AI systems and a small team of humans. Nonetheless, I hope to work in implementing AI-LLM within applications, one of my dream jobs would be to integrate LLMs and AI within video games. AI Start-Up Company Inworld AI Several companies are at the forefront of AI integration within video games. These companies include Google DeepMind, Inworld AI, Rockstar Games, Electronic Arts (EA), NVIDIA, Unity Technologies, Epic Games, Houdini, and Latitude.io. Each company has a slightly different and interesting approach to integrating AI into video games. However, this post will focus on Inworld AI which specializes in creating and integrating AI-driven virtual characters also called NPCs (non-player characters). Inworld AI is the leading Character Engine for adding AI NPCs in video games (Inworld Team, 2024a). “A Character Engine is a development environment that offers a suite of tools and features that help game developers create and deploy real-time generative AI-powered NPCs in video games” (Inworld Team, 2023b). Inworld AI recently announced that they have formed a co-development partnership with Xbox/Microsoft to create AI NPCs with a wide range of emotions and behaviors. These NPCs will feature long-term memory, goals, actions, awareness of being in a game ('4th Wall' – remember past in-game interactions), configurable safety settings, and dynamic relationships. The NPC will also feature knowledge constraints to ensure that they only act on information appropriate for their character. Additionally, Inworld technology integrates well with popular game engines like Unity and Unreal Engine, developers utilize Inworld AI’s API for creating smart NPCs in games like Skyrim and RPGs developed by companies like Niantic and Netease Games (Weitzman, 2023). Gibbs (2022), CEO of Inworld, recognizes, in his blog post “Inworld’s commitment to safety,” that AI-driven creative technologies require careful consideration. He outlines Inworld's approach to safety through the following guidelines: Clear restrictions and guidelines with explicit rules and guidelines to control the content that can be created on the Inworld AI platform. Developer control, providing the tools and control to ensure the content that developers create is appropriate for their intended audience. Reporting and moderation of all conversations and characters on Inworld platforms, are subject to reporting and moderation processes. Extensive safety systems and integrated guard rails are built into all Inworld characters. Ongoing monitoring and improvement to continuously monitor and improve safety. Furthermore, Inworld's guidelines prohibit the creation of characters or content that promotes illegal activities, hate speech, violence, or the violation of user privacy. This approach aligns with the ethical guidelines adopted by most AI companies. These guidelines also align with my ethical values, making Inworld AI a company that a company that I would be proud to work for. As of February 2025, Inworld AI is rapidly growing and offers a variety of career opportunities, with positions ranging from financial controllers to recruitment officers. Additionally, it has several opportunities that are relevant to my AI specialization and my career goals. The table below lists those positions, along with their description and requirements. Table 2 Inworld AI Career Opportunities Software Engineering/AI, February 2025 Note: the table provides several Inworld AI career opportunities in software engineering/AI as of February 2025. Data from “A career at Inworld is a game changer” by Inworld AI (2024). With the exception of the Staff / Principal AI Researcher position, which requires a PhD, my education level after completing my master's will meet the minimum requirements for these positions. However, I would lack the required professional experience, as most are senior-level positions requiring 3 to 6 years of experience. This is understandable, as Inworld is a startup and needs to build its base employee pool with experienced professionals. Hopefully, by December 2026 (the estimated graduation date for my Master's in AI) internships or junior-level positions will be available. However, with the emergence of AI being capable of producing functional code in seconds, and often of better quality than expert coders, and with most junior software engineering positions are mostly focused on coding rather than design, Inworld AI having open junior software engineering seems uncertain, even if the company is very successful. Nonetheless, I hope pursuing and graduating with a master's in AI will give me an edge, making me more competitive in the job marketplace. Summary AI is transforming technology that brings immense benefit to humanity; however, it is fundamentally reshaping how people live and work, presenting potential dangers and ethical issues. As a student in computer science, my main ethical concern is how it is already used and will be used in the future to replace human workers, more specifically knowledge workers. AI has already impacted my education path and my career choices in a significant way. AI start-up companies such as Inworld are hiring software engineers and AI developers. However, by the time I graduate with my master’s in AI, I am not guaranteed that the job market will look the same, or that traditional software engineering roles will even be as widely available as agentic AIs are predicted to be more efficient and cost less than their human counterparts. Although the future seems concerning, I firmly believe that AI has the potential to “benefit all humanity” (OpenAI, 2023); however, it is up to humanity to ensure that it does. References: Capitol Technology University (2023, May 30). The ethical considerations of Artificial Intelligence. Capitol Technology University. https://www.captechu.edu/blog/ethical-considerations-of-artificial-intelligence D’Antonoli T., A. (2020, July 23). Ethical considerations for artificial intelligence: an overview of the current radiology landscape National Library of Medicine. Diagnosis Interventional Radiology, 26(5), p. 504-511.https://dirjournal.org/articles/doi/dir.2020.19279 Fardian, D. (2022, July 1) 5 biggest limitations of Artificial Intelligence. Glair AI. https://glair.ai/post/5-biggest-limitations-of-artificial-intelligence Georgieva, K. (2024, January 14). AI will transform the global economy. Let’s make sure it benefits humanity. IMF Blog. https://www.imf.org/en/Blogs/Articles/2024/01/14/ai-will-transform-the-global-economy-lets-make-sure-it-benefits-humanity Gibbs, K. (2023, November 9). Inworld’s commitment to safety. Inworld AI. https://inworld.ai/blog/inworlds-commitment-to-safety Inworld Team (January 02, 2024a). Future of AI in gaming: Generative AI companies . Inworld AI. https://inworld.ai/blog/future-of-ai-in-gaming-generative-ai-companies? Inworld Team (September 2023b). Why Character Engines are game engines for AI NPCs. Inworld AI. https://inworld.ai/blog/future-of-ai-in-gaming-generative-ai-companies? Inworld AI (n.d.). A career at Inworld is a game changer. Inworld AI. https://inworld.ai/careers Martin, H.(2024, December 18). Salesforce will hire no more software engineers in 2025, says Marc Benioff. Salesforce Ben. https://www.salesforceben.com/salesforce-will-hire-no-more-software-engineers-in-2025-says-marc-benioff/?utm_source OpenAI (2023, February). Planning for AGI beyond. OpenAI. https://openai.com/index/planning-for-agi-and-beyond/ Rowan University (2024). Ways AI can improve our world. Rowan University. https://irt.rowan.edu/about/news/2024/10/ai-benefits.html#:~:text=It%20can%20handle%20boring%2C%20repetitive,as%20images%2C%20text%20and%20music. Science and Technology (DDST) (n.d.). The birth of Artificial Intelligence (AI) research. DDST. https://st.llnl.gov/news/look-back/birth-artificial-intelligence-ai-research Singh, P. (2025, January 29). The transformative impact of Ai in finance: Key use cases. Appinventiv. https://appinventiv.com/blog/ai-in-finance/ St. George University (2024, March 26). 10 Innovative examples of AI in medicine. St. George University School of Medicine. https://www.sgu.edu/blog/medical/ai-in-medicine-and-healthcare/ Takyar, A. (n.d.). AI in education: Use cases, benefits, solution and implementation. Leeway Hertz. https://www.leewayhertz.com/ai-use-cases-in-education/ Thomas, M. (2024, July 25). 14 Risks and dangers of Artificial Intelligence (AI). Built In. https://builtin.com/artificial-intelligence/risks-of-artificial-intelligence University of Cincinnati (n.d.). 9 benefits of Artificial Intelligence (AI) in 2024. University of Cincinnati Online. https://online.uc.edu/blog/artificial-intelligence-ai-benefits/ UTokyo Center for Global Education (2025, February 5). Dialogue at UTokyo GlobE #14: Mr. Sam Altman and Mr. Kevin Weil (CEO and CPO of Open AI) [Video]. YouTube. https://www.youtube.com/watch?v=8LmfkUb2uIY&t=7s Virginia Tech Engineer (2023). AI—The good, the bad, and the scary. Virginia Tech. https://eng.vt.edu/magazine/stories/fall-2023/ai.html Von Der Osten, B. (2023, May 23). Artificial Intelligence Pros and Cons: What are the Advantages and Disadvantages of AI. Rock Content. https://rockcontent.com/blog/artificial-intelligence-pros-and-cons/ Weitzman, C. (2023, November 4). Inworld AI: Revolutionizing gaming with AI-driven NPCs. Speechify. https://speechify.com/blog/inworld-ai/ Zatzu, V., Shine E., A., Tharaka, J., M., Peter, D., Ranganathan, T., V., Alotaibi, S., S, Mugabi, R., M., Muhsinah, A., Ab, Waseem, M., & Nayik, G , A. (2024, December 30). Revolutionizing the food industry: The transformative power of artificial intelligence-a review. Food Chemistry: X, 24. https://doi.org/10.1016/j.fochx.2024.101867
- Database Modeling: Mapping Objects to Relational Databases
This article explores data modeling in software engineering, focusing on how to map object-oriented concepts to relational databases using Object-Relational Mapping (ORM). The article provides an example of a vehicle database management system, utilizing ORM techniques to map vehicle objects to a relational database, incorporating inheritance mapping, relationship representation, and CRUD operations. Alexander S. Ricciardi February 16, 2025 Applications, from e-commerce platforms and social media networks to financial systems, AI development, scientific research, and gaming, depend on their ability to store, manage, and analyze data to function properly and reach their goals. Databases allow data to be stored persistently and structured in a way that can be retrieved reliably for use, manipulation, and analysis. In Software Engineering, data modeling is essential for understanding and developing the relationships between a system's data, its requirements, and its functionality. Given the prevalence of Object-Oriented Programming (OOP) in software development, understanding how to map objects (classes) to the schema of the widely used Relational Database Management Systems (RDBMS) using Object-Relational Mapping (ORM) is essential. To demonstrate the principles of data modeling, including ORM and CRUD operations, this essay provides a vehicle database management system example, supported by a UML class diagrams. Databases Modeling Overview In Software Engineering (SE), “data modeling is the process of creating a visual representation of either a whole information system or parts of it to communicate connections between data points and structures” (IBM, n.d.a, p.1). In other words, the main goal of data modeling is to illustrate the types of persistent data used and stored by a system and the relationships between the persistent data types and the different components of the system. Persistent data are objects that continue to exist beyond a single execution of a computer program (Unhelkar, 2018). Objects in a computer system’s memory are transient meaning that they exist only during the execution of the system program. Data persistence enables a system to store objects at the end of its program executions and retrieve them when a new instance of the program execution begins. This data can be stored in the form of Object-Oriented Databases (OODBs) also called Object Database Management Systems (OODBMS), NoSQL databases, and Relational Databases (RBs) also called RDBMS. Modeling databases is as challenging as modeling business logic; thus it is crucial for software engineers to understand how Object-Oriented concepts (OO) relate to database modeling as they often need to map OO concepts like classes, objects, inheritance, and polymorphism used in OOP to database data types and structures. Object-Oriented Concepts Overview In SE, an object can be defined as an entity that encapsulates internal processes and provides an interface for external processes to interact with it (Galton & Mizoguchi, 2009). Object-Oriented (OO) concepts build upon this, forming a paradigm where systems and real-world entities (e.g., users) are defined as "objects" which are abstractions that encapsulate both data (attributes) and operations performed on that data (methods) (Ricciardi, 2025a). In the context of OOP, the data represent the attributes that define the characteristics of a class, while the operations on the data represent the methods that define the behavior of an instantiated object from the class (Colorado State University Global, n.d.). In other words, classes can contain both executable code in the form of methods and data in the form of attributes. In essence, OOP embodies the principles of OO in blueprints called classes, where those concepts are implemented in specific ways. The list below lists the main principles of OO. Classification, type of object. Abstraction, hiding the object’s internal implementation details including some of its attributes and the functionalities of its methods, while representing those attributes and methods internally. Encapsulation, defining the boundary of an object (modularization), defining an object’s attributes and methods. Association, relationships defining objects’ interactions with each other. Inheritance relationships, defining objects as a generalization (parents) of other objects (children). Polymorphism, how objects respond differently to the same message (same method call). (Ricciardi, 2025a, p.1) To store and manipulate objects in the form of persistent data, developers use various database types, including OODBMS, which are well-suited to directly storing objects without the need for type mapping (modifying the object schema to fit a non-object-oriented data schema). To summarize, OO concepts, including classification, abstraction, encapsulation, association, inheritance, and polymorphism, are essential concepts of SE. These concepts are used to design systems where real-world entities are defined as objects that encapsulate both data (attributes) and the operations (methods) performed on that data. Therefore, understanding OO concepts is critical when mapping object-oriented designs to databases. Object-Oriented Database Overview OODBMS are based on the OO paradigm storing data as objects with their attribute values, operations, and relationships (Unhelkar, 2018). OODBMS stores the object data and structure “as-they-are” preserving the objects’ relationships like inheritance, association, and aggregation. This facilitates greatly the design of OO-based software systems, as objects can be retrieved from the databases and loaded directly into a computer memory system without adding extra processes for data translation. OODBMS can also directly store “as-is” complex data types such as Binary Large Objects (BLOBs) and unstructured data (e.g., video and audio) making them useful for retrieving, storing, manipulating these data types within applications that require retrieval, storage, and manipulation of such data, for example, multimedia systems and scientific data management platforms. Besides storing objects and complex data, OODBMS have several other advantages as well as disadvantages. Table 1 provides a list of some of these advantages and disadvantages. Table 1 OODBMS Advantages and Disadvantages Note: The table lists the advantages and disadvantages of Object Database Management Systems (OODBMS). From “Object-Oriented Principles in Software Engineering: An Overview of OODBMS, RDBMS, and ORM Techniques” by Ricciardi (2025a). To summarize, OODBMS stores data as objects with their relationships and structure, making them ideal for object-oriented applications. Additionally, they directly store complex data types making them well-suited to store and manage BLOBs and unstructured data. However, they also have disadvantages like low performance for simple queries and a lack of standardization. NoSQL Databases Overview NoSQL databases are databases that enable the storage and querying of data outside the traditional structures found in relational databases (data stored in tables) (IBM, 2022b). They can still handle relational data (tables) storing it differently than RDBMS does. Additionaly they can accommodate unstructured data such as unstructured email or feedback on social media (Unhelkar, 2018). They are well-suited to handle large-scale data due to their technology, federated database structure, and their adaptable format schemas. Federated databases are composed of multiple connected databases forming a single unified network (Navlaniwesr, 2024). A real-world example of a federated database could be a data system used by a multinational corporation that has offices in multiple countries (Rajpurohit, 2023). In addition to being capable of handling relational and unstructured data, and well-suited for federated database structure, NoSQL databases have other advantages as well as disadvantages. Table 2 provides a list of some of these advantages and disadvantages. Table 2 NoSQL Databases Advantages and Disadvantages Note: The table lists the advantages and disadvantages of No-SQL databases. Data from several sources (Unhelkar, 2018; ScyllaDB, n.d; InterSytems, n.d.b; Demarest, 2025; Adservio, 2021; Imperva n.d.; Foote, 2022, Quach, n.d.; Macrometa, n.d.; MongoDB, n.d., InterSystems n,d. a). To summarize, NoSQL databases allow for flexible storage and querying of data, including both relational and unstructured data. They are scalable, performant, and adaptable making them suitable for large datasets and federated database systems. However, they also have disadvantages like consistency, security issues, and low standardization. Relational Database Management Systems Overview RDBMS are databases that store data in the form of tables representing predefined relationships through rows and columns (Microsoft, n.d.; Google n.d.). These relationships in RDBMS are established through logical connections, typically using primary and foreign keys allowing for querying and management of the data using programming languages such as Structured Query Language (SQL) (Ricciardi, 2025a). A primary key is a unique identifier for each record (row) in a table, while a foreign key in one table references the primary key of another table, creating a link between them (InterSystems, n.d.a). RDBMS is ideal for storing, retrieving, and managing data that are structured and can be placed in rows and columns (Unhelkar, 2018). Although ODBMS are better suited to handle object-based data and NoSQL databases are more flexible than RDBMS, most commercial business applications still use relational databases as the technology associated with them is affordable, reliable, standardized, widely available, and supported by a vast array of tools. In addition to these advantages, RDBMS have several other advantages as well as disadvantages. Table 3 provides a list of some of these advantages and disadvantages. Table 3 RDBMS Advantages and Disadvantages Note: The table lists the advantages and disadvantages of Relational Databases Management Systems (RDBMS). From “Object-Oriented Principles in Software Engineering: An Overview of OODBMS, RDBMS, and ORM Techniques” by Ricciardi (2025a). To summarize, RDBMS store data in tables with predefined relationships through rows and columns and use SQL for data management. They have advantages like simplicity, accuracy, data integrity, security, and accessibility, making them more widely used than the other database types. However, they have also disadvantages like difficulty to scale with extremely large datasets and a rigid schema that can be difficult to modify. Mapping Objects to RDBMS As mentioned previously, RDBMS are widely used; however, most software applications are designed using OOP principles implying that persistent object-based data, in systems with RDBMS backends, must be mapped to a relational schema composed of tables, rows, and columns. ORM is an RDBMS concept that helps bridge the gap between OOP and relational databases (Rajputtzdb, 2024). In ORM, classes are mapped to tables, the class attributes are matted to the columns of the corresponding tables, and the instantiated class object to rows of the corresponding table (Ricciardi, 2025a). The next section explores ORM concepts and database modeling through a vehicle database management system example. Vehicle Database Management System Using Relational Database This section explores step-by-step the modeling of a vehicle database management system using RDMS. Starting with a simple class diagram containing three classes: Vehicle, Car, and Truck with two attributes. Then the classes (represented by the class diagram) are mapped, using OMR concepts, to a single-table design, a two-table design, and a three-table design. In the next step, using the two-table design the Car and Truck tables are populated with object data. Next, another class diagram is created showing a Driver and Car association, first with a one-to-many and then a many-to-many relationship, and the table models are modified to reflect the different multiplicities using primary and foreign keys. Finally, a class diagram is created representing the final RDMS design, using the <> stereotype, as well as the corresponding relational tables. Step-1 Diagram for Vehicle, Car, and Truck Figure 1 Initial Vehicle System Class Diagram Note: The figure illustrates the initial vehicle system class diagram used to design the single-table design, a two-table design, and a three-table design. The diagram was made using the Lucid App. In SE, Unified Modeling Language (UML) class diagrams are a type of structural diagram used to model object processes and the static structures of a system and its subsystems (Ricciardi, 2025b). They also model and illustrate class-to-class relationships such as associations, inheritance, aggregation, composition, dependency, and realization. Table 4, lists the different notation elements that can be found in a class diagram. The table also provides definitions of class diagram components including class-to-class relationships, as well as examples of usage of those components and notations. Table 4 UML Class Diagram Notation Note: The table provides a list of the different notation elements that can be found in a class diagram, definitions of class diagram components, and examples of usage of those components and notations. From “UML Class Diagrams: Modeling Systems from Problem Space to Solution Space” by Ricciadi (2025b). Modified. Figure 1 illustrates the initial vehicle system class diagram, depicting the Vehicle, “Car”, and Truck with two attributes each. The diagram also shows that the Car and Truck are subclasses of the superclass Vehicle, meaning that the Car and Truck classes inherit the attributes and methods of the superclass Vehicle. This plays a significant on how the attributes of the Vehicle are going to be mapped within the Car and Truck classes. Additionaly, the ‘id’ (e,g. carId) attributes of each class play significant roles, as keys, in the mapping process. To summarize this step, Table 1 provides illustrations and definitions of the main UML class diagram notations (Class, Attributes, Operations, Multiplicity, Association, Inheritance, etc.). Class diagrams are used to model the static aspects of a system, and the class diagram in Figure 1 depicts a set of classes illustrating a vehicle system having inheritance relationships, where subclasses inherit attributes and methods from the superclass. Moreover, the id attributes represented within each class are crucial for mapping those classes to relational databases. Step-2 Exploring the Single-Table, Two-Table, and Three-table designs One of the simplest ORM techniques is one-to-one mapping, “where classes are mapped to tables, class attributes are mapped to the table columns, and the instantiated objects are mapped to rows in the corresponding table” (Ricciardi, 2025b, p. 2). Figure 2 illustrates how this is done. Figure 2 ORM One-To-One Mapping Technique Note: The figure illustrates the ORM one-to-one mapping technique of the “Car” class. Mapping the Car class to the Car_table. As shown in Figure 2, the attributes of the Car class are mapped to the columns of the Car_table table. However, this technique does not map to the Car class its attributes are inherited from the superclass Vehicle. Nonetheless, the ORM one-to-one mapping technique is the first good step in modeling class-to-table. To fully represent the inheritance relationship between the classes, a better approach is needed, such as mapping the classes to single-table, two-table, or three-table designs. Figure 3 The Single-Table Design Note: The figure illustrates the mapping of the superclass Vehicle to the single-table design Vehicle_table. Single-Table Design In the single-table design illustrated in Figure 3, all the attributes from the superclass and the subclasses are mapped to the columns of the Vehicle_table table. This table stores all the objects that can be categorized as instantiated Vehicle objects, which include the Car and Truck objects due to their inheritance from the Vehicle class. Note that the row represented data saved from instantiated Car and Truck objects. In the context of RDMS, tables are also called relations, this table can be described as the inheritance table storing data from the Vehicle superclass attributes and its subclasses, Car and Truck mapped to the same table. This is done by mapping the ‘ids’ (e.g. carId, truckId) attributes of the subclasses as foreign keys in the Vehicle_table table. As mentioned previously, a primary key uniquely identifies each record (row) in a table, while a foreign key references the primary key of another table, illustrating a relationship between them. In this example the relationship represented is a one-to-one relationship, meaning that meaning that each Vehicle object can only be a single Car (identified by carId) or a single Truck (identified by truckId), but not both. Although, this large table stores all the data related to the Vehicle hierarchy in a single table, representing an inheritance relationship, which may be useful for applications with relatively small datasets. However, it wastes space, causing the data not to be inconsistent, as shown by the empty cells (e.g. in the Truck object rows, the cells corresponding to the column carId and carType are always NULL), potentially affecting system performance. "This problem can be exacerbated with deeper inheritance hierarchies" (Unhelkar, 2018, p. 223), because mapping a large number of classes to a single table can lead to increased traffic during Create, Read, Update, and Delete (CRUD) operations. This, in turn, can cause lock contention and object conflicts compromising the data integrity and system performance issues. Figure 4 The Single-Table Design Note : The figure illustrates the mapping of the classes Vehicle, Car, and Truck to the two-table design. It is important to notice the design features a Car_table table and a Truck_table table but not a Vehicule_table table and the attribute vinNum from the Vehicle class. Two-Table Design An alternative to the single-table design is the two-table design illustrated in Figure 4. In this table design, the attributes from the classes Car and Truck are mapped to the columns of their respective tables. Additionally, the attribute vinNum from the is mapped to the Car_table and Truck_table tables. Although this solution preserves data consistency1 and integrity2, it does not reflect the inheritance relations that exist between the superclass Vehicle and its subclasses Car and Truck as their tables do not store the Vehicle_table data primary key values. Thus, this design is not the best design to represent the relationship between classes. Figure 5 The Three-Table Design Note : The figure illustrates the mapping of the classes Vehicle, Car, and Truck to the two-table design. It is important to notice the design features a Car_table table and a Truck_table table but not a Vehicle_table table and the attribute vinNum from the Vehicle class. Three-Table Design A better design option to represent relationships between classes, preserve data consistency and integrity, and maintain system performance is the three-table design, In Figure 5, all class and their attribute are mapped to their respective tables. The Car_table and Truck_table tables store the primary key values from the Vehicle_table table as foreign key values representing a relationship between the Vehicle_table table and each of the other two tables. This relationship is a one-to-one relationship simulating a “is a” relationship. In other words, through the use of the Vehicule_table primary key values (VehiculeId) as foreign key values in the Car_table and Truck_table tables, ORM simulates the inheritance relationship where the Car and Truck objects are a child of the parent Vehicle, in other terms, the Car and Truck classes are subclasses of the superclass Vehicle. In other words, the three-table design simulates inheritance in relational databases by using foreign keys making them a better choice than single-table and two-table designs for representing object hierarchies. To summarize this step, the three table designs for mapping the Vehicle, Car, and Truck inheritance hierarchy to relational database tables show that the Single-Table design places all attributes in one table (Vehicle_table) and can lead to redundancy and potential inconsistencies that may affect a system perforce, especially in systems with large datasets. The Two-Table design creates separate tables for subclasses (Car_table, Truck_table). This improves data consistency from the single-table design; however, it does not fully represent the inheritance relationship because subclass tables lack the Vehicle's primary key. On the other hand, the Three-Table design separates the tables creating a table for each class with subclass tables containing the superclass primary key values as foreign key values. This table indexing method reflects the model's inheritance and preserves data integrity and consistency. Additionaly, this approach also enhances system performance as it minimizes traffic (Unhelkar, 2018). For all these reasons, the three-table design is the best choice for modeling complex object systems with inheritance relationships within a relational database. Step-3 Mapping Multiplicity to Relational Databases In the context of OOP, multiplicity defines the number of instances of one class that can be associated with a single instance of another class within a particular relationship (Greeff & Ghoshal, 2004). These multiplicities can be one-to-one, one-to-many, many-to-one, or many-to-many relationships. The table below provides a description and example of these relationships in the context of relational databases. Table 5 Multiplicity Relationship s Note : the table provides descriptions of the different multiplicity relationships, as well as, examples. From several sources (Virgo, 2025; IBM, 2021c; Nalimov, 2024; Claris, 2024) Figure 6 Driver-Car One-To-Many Note : the figure illustrates a driver-car one-to-many multiplicity relationship, where a driver can use (drive) many cars. Figure 7 Driver-Car Many-To-Many Note: The figure illustrates a driver-car many-to-many multiplicity relationship, where a driver can use (drive) many cars and a car can have many drivers. Note that when mapping many-to-many relationships in relational databases, requires the implementation of a link table (Car_Driver_Table) that combines the primary keys of the associated tables as foreign keys. Mapping One-To-Many Multiplicity In Figure 6, the Driver and Car classes association relationship with a multiplicity of one-to-many is mapped to the tables by adding the primary key values from the Driver_table to the Car_table as foreign key values. In Figure 7, the Driver and Car classes association relationship with a multiplicity of many-to-many is mapped to the tables. This is done by creating the table Car_Driver_Table which links the primary key values from both tables. Note that the primary key values from the two tables are considered foreign keys and the the primary key values for the link table are a combination of the primary key values from the tables. See Code Snippet 1 for an example of how to create the table in SQL. Code Snippet 1 SQL Code For The Car_Driver_Table -- Create the link table Car_Driver_Table CREATE TABLE Car_Driver_Table driverId INT, carId INT, PRIMARY KEY (driverId, carId), -- primary key CONSTRAINT fk_driver FOREIGN KEY (driverId) REFERENCES Driver(driverId), CONSTRAINT fk_car FOREIGN KEY (carId) REFERENCES Car(carId) ); -- Insert data into the link table INSERT INTO Car_Driver_Table (driverId, carId) VALUES (1029, 9876); INSERT INTO Car_Driver_Table (driverId, carId) VALUES (1029, 8765); INSERT INTO Car_Driver_Table (driverId, carId) VALUES (2376, 9876); INSERT INTO Car_Driver_Table (driverId, carId) VALUES (2376, 8765); Note: The SQL code creates the Car_Driver_Table and stores the driverId and carId values to link drivers and cars together, representing the many-to-many relationship between them. Step-4 Modify Class Diagram Driver and Car Classes CRUD Operations Only classes and class attributes can be mapped to relational databases and class-to-class relationships can be simulated through the use of primary and foreign keys, what was not addressed yet by this essay is object behavior in the form of class methods. Object behavior can be simulated within the context of a relation database using CRUD operations. CRUD stands for Create—creates an object. Read—search for an object (record) from storage based on a criterion (key). Update—search and update objects (records). Delete—locates and remove a persistent object (Unhelkar, 2018; Ricciardi, 2025) These operations are executed using query languages such as Structured Query Language (SQL). Thus, it is important when designing a software system that uses databases to separate application-specific behaviors from database-specific behaviors. ULM allows the separation of persistent data operations from a system or business logic using stereotypes such as <> for classes that deal with the behavior of the system and <> that deal with relational database table CRUD operation. It is also best practice to use control classes that will act as intermediaries between <> and <> classes. These classes provide an interface that effectively routes CRUD operations. UML uses the stereotype <> to label these intermediary classes, which are often referred to as managers or controllers. Implementing control classes “ensures that the application will remain totally separate from the database, offering advantages in terms of flexibility and reducing the impact of changes in the application on the database, as well as changes in the database on the application” ( Unhelkar, 2018, p. 222). However, they also add performance overhead as they need to be executed at run time. To summarize this step, object behavior (methods) in a relational database is represented using CRUD operations (Create, Read, Update, Delete) executed via SQL. UML stereotypes (<>, >, <>) are used to separate business logic from database interactions. Additionally, <> classes (managers/controllers) act as intermediaries, improving flexibility but adding runtime overhead. To summarize this step, the process of mapping multiplicity from OO concepts to relational databases is based on the one-to-one, one-to-many, many-to-one, and many-to-many relationships. The one-to-many relationship is mapped by adding a foreign key to the table representing the "many" side and a many-to-many relationship is mapped using a link table with a composite of the primary keys from the linked tables. The SQL code snippet provides an example of how a link table (Car_Driver_Table) for a many-to-many relationship can be handled using SQL code. Step-5 Final Class Diagram and Tables In this section, all the concepts discussed previously are implemented within an example of a class diagram of a vehicle database management system and a set of tables. Figure 8 Vehicle Database Management System Class Diagram Note : The figure illustrates the final class diagram of the vehicle database management system. Figure 9 Vehicle Database Management System Tables Note : The figure illustrates the set of tables used by the vehicle database management system. Figure 8 illustrates the final UML class diagram of the vehicle database management system. It incorporates the classes Vehicle, Car, Truck, and Driver which are represented with the <> stereotype. The relationships between these classes include both inheritance and many-to-many associations. These classes implement the business logic of the system. The database logic is implemented by the Car_Driver_Table, Driver_table, Vehicle_table, Car_table, and Truck_table which are represented with the <> stereotype. Their role is to simulate the relationships and behaviors of the Car and Driver classes. Additionally, the VehicleManager class represented with the <> stereotype acts as an abstraction between the system business logic and the system database logic by providing an interface that encapsulates and manages the CRUD operations. Figure 9 shows the final set of tables for the vehicle database management system. This design utilizes the three-table approach for inheritance, with separate tables for Vehicle, Car, and Truck objects. The many-to-many relationship between Driver and Car objects is implemented using the Car_Driver_Table table, which stores the associations between specific drivers and cars by storing the primary key values from both the Driver_table and Vehicle_table tables. The inheritance relationships between the superclass Vehicle and its subclasses Car and truck is simulated by mapping the Vehicle_table primary key values to both Driver_table and Vehicle_table tables as foreign key values. To summarize this step, when implementing a relational database it is important to separate business or system logic (entity classes) from database logic (table classes) using UML stereotypes such as <>, <>, and >. Control classes act as intermediaries between the classes modeling the business logic and the ones modeling the database logic. They manage CRUD operations improving the flexibility of the system. Conclusion Databases allow data to be stored persistently and structured in a way that can be retrieved reliably for use, manipulation, and analysis. OODBMS and NoSQL databases offer advantages for specific data types. However, Relational Database Management Systems (RDBMS) remain prevalent due to their reliability, standardization, and the wide usage of SQL. Using UML class diagrams, ORM techniques, and a vehicle database management system example based on the RDBMS model, this essay explored various inheritance mapping strategies (single-table, two-table, and three-table) and the representation of one-to-many and many-to-many relationships. It also highlighted the importance of separating business logic from database logic using UML control, entity, and table class concepts and stereotypes. Ultimately, the choice of using relational databases with a three-table design to model the vehicle database management system example is based on this approach's ability to represent object inheritance, ensure data integrity, and provide query performance, while preserving data consistency and integrity. This highlights how important it is to understand how to map object-oriented concepts to relational database schemas for building modern applications. References Adservio (2021, March 15). What are the pros and cons of NoSQL. Adservio . https://www.adservio.fr/post/what-are-the-pros-and-cons-of-nosql Arnold, J. (2023, August 30). Data consistency vs data integrity: Similarities and differences . IBM. https://www.ibm.com/think/topics/data-consistency-vs-data-integrity#:~:text=Data%20consistency%20refers%20to%20the,database%20systems%2%20applications%20and%20platforms . Claris (2024). Many-to-many relationships. Working with related tables . Claris. https://help.claris.com/en/pro-help/content/many-to-many-relationships.html Colorado State University Global (n.d.). Module 7.1 Data Storage Mechanisms [Interactive lecture]. CSC470 Software Engineering, CSU Global, Departement of Computer Science. Canvas. Retrieved January 29, 2025, from: https://csuglobal.instructure.com/courses/104036/pages/7-dot-1-data-storage-mechanisms?module_item_id=5372300 Demarest, G. (2025, January 15). NoSQL cloud databases: Benefits and features explained . Aerospike. https://aerospike.com/blog/nosql-cloud-databases-benefits/ Foote, K. D. (2022, November 17). NoSQL Databases: Advantages and Disadvantages . DATAVERSITY. https://www.dataversity.net/nosql-databases-advantages-and-disadvantages/ Galton, A., & Mizoguchi, R. (2009). The water falls but the waterfall does not fall: New perspectives on objects, processes and events . Applied Ontology, 4(2), 71–107. https://doi.org/10.3233/AO-2009-0067 Google (n.d.). What is a relational database? Google Cloud. https://cloud.google.com/learn/what-is-a-relational-database Greeff, G. & Ghoshal, R. (2004, August) 5 - Business process and system modeling tools and packages. Practical e-manufacturing and supply chain management. Newes. p. 112-145. ISBN 9780750662727 IBM (n.d.a). What is data modeling? IBM Think. https://www.ibm.com/think/topics/data-modeling IBM (2022b, December 12). What is a NoSQL database? IBM Think. https://www.ibm.com/think/topics/nosql-databases IBM (2021c, March 3). Database relationships. IBM Documentation. https://www.ibm.com/docs/en/mam/7.6.0?topic=structure-database-relationships Imperva (n.d.). NoSQL injection . Imperva. https://www.imperva.com/learn/application-security/nosql-injection/ InterSytems (n.d.a). NoSQL databases explained: Advantages, types, and use cases. InterSytems. https://www.intersystems.com/resources/nosql-databases-explained-advantages-types-and-use-cases/ InterSystems (n.d.b). What is a relational database and why do you need one? InterSystems. https://www.intersystems.com/resources/what-is-a-relational-database/ Macrometa, (n.d.) Chapter 2 - Advantages and disadvantages of NoSQL. Distributed data. Macrometa. https://www.macrometa.com/distributed-data/advantages-and-disadvantages-of-nosql Microsoft (n.d.). What is a relational database? Microsoft Azure. https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-a-relational-database MongoDB (n.d.). Advantages of NoSQL databases . MogoDB. https://www.mongodb.com/resources/basics/databases/nosql-explained/advantages Nalimov, C. (2024, April 16). Exploring one-to-many relationship examples in databases. Gleek. https://www.gleek.io/blog/one-to-many Navlaniwesr (2024, July 9). Database federation - System design. GeeksForGeeks. https://www.geeksforgeeks.org/database-federation-system-design/ Quach, S. (n.d.). NoSQL databases: NoSQL databases: What it is, how it works and how is it different from SQL . Knowi. https://www.knowi.com/blog/nosql-databases-what-it-is-how-it-works-and-how-is-it-different-from-sql/ Rajputtzdb (2024, February 28) What is Object-Relational Mapping (ORM) in DBMS? GeeksForGeeks. https://www.geeksforgeeks.org/what-is-object-relational-mapping-orm-in-dbms/ Rajpurohit, A. (2023, March 28). Understanding Federation in Databases: Definition, types and use cases. Akash Rajpurohit. https://akashrajpurohit.com/blog/understanding-federation-in-databases-definition-types-and-use-cases/?utm_source Ricciardi, A. (2025a, February 1). Object-Oriented principles in software engineering: An overview of OODBMS, RDBMS, and ORM techniques. Omegapy - Code Chronicles. https://www.alexomegapy.com/post/object-oriented-principles-in-software-engineering-an-overview-of-oodbms-rdbms-and-orm-techniques Ricciardi, A. (2025b, January 21). UML class Diagrams: modeling systems from problem space to solution space . Omegapy- Code Chronicles. https://www.alexomegapy.com/post/uml-class-diagrams-modeling-systems-from-problem-space-to-solution-space ScyllaDB (n.d.). Database scalability. ScyllaDB . https://www.scylladb.com/glossary/database-scalability/ Unhelkar, B. (2018). Chapter 13 — Database modeling with class and sequence Diagrams. Software engineering with UML . CRC Press. ISBN 9781138297432 Virgo, J. (2025, February 13). Relationships in SQL – complete guide with examples . Dittofi. https://www.dittofi.com/learn/relationships-in-sql-complete-guide-with-examples
- Why Kotlin is Preferred for Android App Development
This article explains why Kotlin is the preferred programming language for Android app development. It lists its advantages over Java and C++ and describes Kotlin's key features like concise syntax, null safety, and coroutines, emphasizing its efficiency, ease of use, and strong support from Google and the Android ecosystem. Alexander S. Ricciardi February 14, 2025 When developing an Android app, one of the first decisions a developer needs to make is choosing a programming language. Kotlin, a relatively new language, has quickly become the preferred choice for many. Kotlin has been endorsed by Google since 2017, meaning that it is the official programming language for Android application development (Samojło, 2024). Google’s parent company, Alphabet, owns Android, and Google manages it as a subsidiary. Additionally, over 95% of the top 100 Android apps use Kotlin (Kotlin, n.d.). This article explores the advantages of developing Android applications using Kotlin over other programming languages. Kotlin is described as the most succinct language, therefore making the least error-prone (Horton, 2019). While Android SDK is largely written in Java, Kotlin is fully interoperable with Java, meaning that Java libraries and frameworks can be integrated into Kotlin, and Java projects can be migrated to Kotlin. Additionally, Kotlin has the following features: It is an Object-Oriented Programming language (OOP). It includes null safety, preventing null pointers. It allows function extensions, that is adding functionality to existing classes without modifying their source code. It allows data classes which are classes primarily used to hold data. It can implement coroutines, making asynchronous programming much easier such as handling network requests. When compared to C++ and Java, Koltin has significant advantages for Android development, the table below lists some of these advantages. Table 1 Kotlin’s advantages over C++ and Java Note: The table lists several advantages that Kotlin has over C++ and Java. From several sources (Kotlin n.d.; Horton, 2019; Samojło, 2024; Ramos, 2023, Rkumaraj, 2023, Developers, n.d.; Berga et al, 2019; Lotarev, 2024; Zaręba et al., 2024) In conclusion, Kotlin has several advantages for Android development over other OOP languages such as more concise syntax, null safety, coroutines support, interoperability with Java, Jetpack Compose support, and function extensions; moreover, it is endorsed by Google as the official programming language for Android application development. Overall Kotlin provides a more modern, safer, and more productive approach to developing Android applications than other programming languages. References: Berga, M., Figueiredo, R., & Franco, T. (2019, Aprill 19). Kotlin vs Java: the 12 differences you should know. Imaginary Cloud. https://www.imaginarycloud.com/blog/kotlin-vs-java Developers (n.d.). Android’s Kotlin-first approach. Developers. https://developer.android.com/kotlin/first Horton, J. (2019). Android programming with Kotlin for beginners. Packt Publishing. ISBN: 9781789615401 Kotlin (n.d.). Kotlin for Android. Kotin overview. Kotlin. https://kotlinlang.org/docs/android-overview.html Long, M. (2023, June 28). Can C++ be used for Android app development? Groove Technology. https://groovetechnology.com/blog/software-development/can-c-be-used-for-android-app-development/ Lotarev, I. (2024, January 16). Kotlin vs Java: Which is better for Android app development? Adapty. https://adapty.io/blog/kotlin-vs-java/ Ramos, M. (2023, September 18). Kotlin vs Java for mobile and Web development. Kinsta. https://kinsta.com/blog/kotlin-vs-java/ Rkumaraj. (2023, May 8). Why Kotlin is the best choice for Developing Android Apps. Medium. https://medium.com/@rkumaraj5694/why-kotlin-is-the-best-choice-for-developing-android-apps-7ce306fcc6ec Samojło, G. (2024, November 26). Pros and Cons of Kotlin for Android App Development. Netguru. https://www.netguru.com/blog/kotlin-pros-and-cons Zaręba, G., Zarębski, M., & Smołka, J. (2024). C++ and Kotlin performance on Android – a comparative analysis. Journal of Computer Sciences Institute , 30 , p. 21–25. https://doi.org/10.35784/jcsi.5299
- Navigating the AI Revolution: Promoting Innovation and Mitigating Risks
This article discusses the importance of establishing ethical guidelines that both promote the advancement of AI technologies and ensure their safe and responsible implementation, highlighting the need for integrating ethical principles directly into AI systems and fostering a development culture that prioritizes safety and societal well-being. Alexander S. Ricciardi March 25th, 2024 Since the release of the chatbot ChatGPT, Artificial Intelligence (AI) technologies have been a feature of the news, suddenly bringing awareness to the technologies’ potential to revolutionize how people live and work. Additionally, the rapid exponential advancements and growth of these technologies have also sparked fears of misuse, loss of control, the risk of human extinction, and an intense debate about the need for guidelines to ensure their safe and ethical development and implementation. There are also concerns about the feasibility of establishing guidelines that simultaneously promote advancements in AI technology and safeguard society's safety and well-being, with some advocating for severe restrictions on these technologies. However, rather than implementing a fallacy of draconian restrictions or pauses, it is both feasible and critically important to establish guidelines that promote AI technological advances and development while ensuring their implementation is not harmful to individuals, communities, and society. This is possible by advocating for the integration of ethical principles directly into AI systems through approaches like Constitutional AI (CAI) and AI Ethical Reasoning (AIER), by establishing an AI developers' culture that prioritizes safety and ethics, and by establishing a governmental agency that aims to guide the society through the economic and social changes that AI advancements are inevitably bringing. The Question Is it feasible to establish AI guidelines that promote advancement in AI technologies, while ensuring that their implementation is not harmful to society? It is possible by advocating for the integration of ethical guidelines directly into the AI systems themselves, rather than imposing limitations on AI advancements. For instance, Arbelaez Ossa et al. (2024) in their quantitative study “Integrating Ethics in AI Development: A Qualitative Study” explore the best ethical approach to aligning AI development with healthcare needs. They interviewed 41 AI experts and analyzed the data using reflective thematic analysis. A thematic analysis is qualitative research used to identify, analyze, and report patterns (themes) within data. Their findings indicated that when developing an AI, especially for healthcare, AI developers need to consider the ethics, goals, stakeholders, and the specific situations where AI will be used, rather than the technology itself. This approach promotes AI advancements and ensures that ethical guidelines are aligned with the needs and requirements of different healthcare systems. Table 1 GPQA Benchmark Note : Benchmark evaluation results for GPQA. From Constitutional AI: Harmlessness from AI Feedback, by Bai et al., 2022, Table 8. Additionally, a new concept is emerging in AI development that promotes advancement in AI technologies with the integration of ethical guidelines directly into the AI systems. The article "Constitutional AI: Harmlessness from AI Feedback" (Bai et al., 2022) from Anthropic introduces a new approach called Constitutional AI or CAI for training AI systems to be helpful, honest, and harmless using a combination of supervised learning and reinforcement learning techniques. In other words, the CAI approach integrates ethical guidelines directly into the AI systems training. Anthropic is an American AI startup company, founded by former members of OpenAI. Anthropic’s last state-of-the-art model Claude-3, which was trained with the CAI approach, surpasses ChatGPT-4 and Google Gemini models in all reasoning, math, coding, reading comprehension, and question-answering benchmarks as well as in Graduate-Level Google-Proof Q&A benchmark (GPQA), as illustrated in Table 1. GPQA is a dataset designed to evaluate the capabilities of Large Language Models (LLMs) as well as the effectiveness of oversight mechanism frameworks, which are processes that ensure AI systems operate safely, ethically, and according to guidelines and societal norms. Furthermore, AI systems can be trained to reason more efficiently, consequently avoiding the generation of potentially biased or harmful content. Zelikman et al. (2024) argue that their generalized Self-Taught Reasoner (STaR) algorithm can train language models (LMs) to reason more efficiently by using a single thought training process. They describe this approach as “applying STaR ‘quietly’, training the model to think before it speaks” (Zelikman et al. 2024, p2) or Quiet-STaR. Figure 1 visualizes this Quiet-STaR single thought training process. They apply Quiet-STaR to Mistral 7B LLM, improving considerably the reasoning abilities of the Mistral model. Nonetheless, it can be argued that integrating the Quiet-STaR technique with the Anthropic CAI approach could teach AI systems to reason more efficiently, consequently avoiding the generation of potentially biased or harmful content, this can be referred to as AI Ethical Reasoning or AIER. Therefore, integrating Arbelaez Ossa et al. quantitative study, the Anthropic CAI, and the Quiet-STaR approaches into the development of AI systems can significantly diminish the potential for the systems to generate biased or harmful content, making their implementation safer. This demonstrates that it is feasible to promote advancement in AI technologies while ensuring that their implementation is not harmful to society. However, many argue that it is not possible, believing that the risk posed by AI is so significant that it is crucial to establish guidelines that limit or even pause advancements in AI technologies. Figure 1 Quiet-STaR Note: Visualization of the Quiet-STaR algorithm as applied during training to a single thought. From Quiet-STaR: Language models can teach themselves to think before speaking, by Zelikman et al., 2024, Figure 1 The Counterargument The Future of Life Institute (2023) in its article “ Policy Making in the Pause ” argues for the implementation of robust third-party auditing and certification for specific AI systems and a pause on AI development until AI labs “have protocols in place to ensure that their systems are safe beyond a reasonable doubt, for individuals, communities, and society.” (Future of Life Institute, 2023, p4). The authors conclude by arguing that the dangers of unchecked AI advancements can result in substantial harm, in both the near and longer term, to individuals, communities, and society. On the other hand, robust third-party auditing and certification of AI research and development can achieve responsibly developed AI that benefits humanity. At first glance, this approach seems to be similar to one proposed by Arbelaez Ossa et al. and the Constitutional AI method, which is to ensure that AI development is responsible and beneficial to society. However, the Future of Life Institute's proposal advocates for a pause in AI development until safety protocols are in place, while the other approaches are more focused on integrating ethical guidelines directly into the AI systems themselves without necessarily limiting or pausing advancements in AI technologies. In other words, Future of Life Institute's approach does not promote AI advancements but instead advocates for limiting it. This approach is also shared by others, the author of the Time article “Exclusive: U.S. Must Move ‘Decisively’ to Avert ‘Extinction-Level’ Threat From AI, Government-Commissioned Report Says” (Perrigo, 2024) reports that Gladstone AI, an AI startup commission by the U.S. Government to conduct an AI risk assessment, warns that the advances in AI, more specifically in Artificial General Intelligence (AGI) pose urgent and growing risks to national security, potentially causing an extinction-level threat to the human species. Gladstone AI recommends making it illegal to train AI models above a certain computing power threshold, requiring government permission for AI companies to train and deploy new models, outlawing open-source AI models, and severely controlling AI chip manufacture and export. This approach goes further than the Future of Life Institute approach in limiting and controlling AI development by arguing for draconian government oversight over the AI industry. However, the Future of Life Institute and Gladstone AI proposal are a case of "shutting the stable door after the horse has bolted." Not only the approaches are impossible to implement worldwide but can also be extremely harmful to the future well-being of Western nations. The Fallacy “Shutting the stable door after the horse has bolted” is a fallacy that occurs when suggesting a solution for an issue that has already occurred or is currently occurring. In the context of AI development, arguing for strict regulations or a complete halt to AI research and development when advanced AI systems are already being developed and deployed by various organizations worldwide is an example of this fallacy. The current state of AI development is rapidly advancing, and ignoring this reality while arguing for potentially ineffective or late measures might not effectively address the risks posed by AI. For instance, on March 12, 2024, Cognition AI launched the first fully autonomous AI agent, Devin. Devin is an AI system autonomously capable of fully developing software, training other AI models, and editing its own codebase. (Vance, 2024) Moreover, implementing such restrictions poses potential risks for Western nations to miss the Artificial Superintelligence (ASI) ‘train,’ especially if other countries, like China and Russia, do not follow suit. Bostrom, a renowned philosopher at the University of Oxford and the director of the Future of Humanity Institute said in a Big Think interview, “I think there is a significant chance that we'll have an intelligence (AI) explosion. So that within a short period of time, we go from something that was only moderately affecting the world, to something that completely transforms the world.” (Big Think, 2023, 02:05). The illustration by Tim Urban, see Figure 2 “ANI-AGI-ASI Train,” (Urban, 2015) supports well Bostrom’s argument. Furthermore, the illustration acts as a metaphor for the rapid advancement of AI technologies and the possibility that if Western nations fail to keep pace with these advancements due to overly restrictive regulations will fall behind nations such as China and Russia. For instance, in a two-year study, the U.S. National Security Commission on Artificial Intelligence warned "China is already an AI peer, and it is more technically advanced in some applications. Within the next decade, China could surpass the US as the world's AI superpower." (Sevastopulo, 2021, p1). Therefore, the best approach for Western nations to remain competitive in the field of AI is to adopt and combine the Arbelaez Ossa et al. and Anthropic CAI approaches with AI reasoning techniques such as Quiet-STaR, which promote AI advancements while ensuring their implementation is not harmful to society by directly integrating ethics and ethical reasoning capabilities into the training and development of the AI models. Figure 2 The ANI-AGI-ASI Train Note: The illustration is a metaphor that depicts the rapid advancement of AI technology, progressing from Artificial Narrow Intelligence (ANI), which is less intelligent than human-level intelligence, to Artificial General Intelligence (AGI), which is equivalent to human-level intelligence, and to Artificial Super-Intelligence (ASI), which surpasses human intelligence. From The AI revolution: The road to superintelligence Part-2, by Urban, 2015. The Solutions To establish ethical guidelines that promote the advancement of AI technologies while ensuring its implementation is not harmful to society, it is essential to build on Bai et al. (2022) concept of Constitutional AI by integrating ethical guidelines directly into the training of AI systems. Additionally, as suggested by Arbelaez Ossa et al. (2024), AI developers should prioritize ethics, goals, stakeholders, and the specific contexts in which AI will be deployed. To achieve this, several strategies are proposed. For instance, in a Senate subcommittee hearing, Altman, CEO of OpenAI, proposed creating an agency to issue licenses for developing large-scale AI models, establish safety regulations, and test AI models before public release, and Montgomery, IBM's chief privacy and trust officer, advocated for a precision regulation approach that focuses on specific AI uses rather than regulating the technology itself. (Kang, 2023) Ng renowned computer scientist in AI, founder of DeepLearning.AI , and adjunct professor at Stanford University (Stanford HAI, n.d.), in his lecture on July 26, 2023, at Stanford University dismisses concerns about AI posing an existential threat to humanity, arguing that AI development will be gradual and manageable (Stanford Online, 2023). In other words, Ng's approach to AI regulations is not to regulate AI technologies directly but to manage their implementation gradually. This approach is similar to the approach proposed by Webb, the founder of the Future Today Institute and professor of strategic foresight at the NYU Stern School of Business. During the 2024 South by Southwest Conference (SXSW), she suggested the establishment of a U.S. Department of Transition. (SXSW, 2024) The department would be tasked with assessing and forecasting how the advancements in AI technologies, connected devices, and biotechnology would affect different sectors of the economy. In other words, the department would assist the country's economy in adapting to the rapid technological advancements driven by the emergence of AI. All these strategies share the common goal of establishing ethical guidelines that promote the advancement of AI technologies while ensuring their implementation is not harmful to individuals, communities, and society. The only sensible solution to implementing the approach is adopting minimal AI technology development regulatory guidelines, with the government acting as both a facilitator in the advancement of AI technologies and as a gatekeeper ensuring that its implementations are not harmful to society. This approach is only possible by applying the principles of Constitutional AI in AI development, and by establishing an AI developers' culture that prioritizes efficient and safe AI reasoning capabilities in line with ethics or AIER, goals, stakeholders, and the specific context where each AI system would be deployed. Conclusion While the rapid advancement of AI technologies has raised concerns about the potential risks that it poses to society, it is not only possible but essential to establish guidelines that promote the development and advancement of AI technologies while ensuring their implementation is not harmful to individuals, communities, and society. This can be done by integrating ethical principles directly into AI systems through approaches like Constitutional AI and AI Ethical Reasoning by fostering an AI development culture that prioritizes ethics, stakeholder considerations, and context-specific deployment, rather than implementing severe restrictions or pauses on AI advancements. Furthermore, oversight and regulation of AI require a nuanced approach, especially for Western nations, to avoid missing out on the rapid advancements toward Artificial Superintelligence. This can be done by implementing gradually AI technologies and by establishing government agencies like the proposed U.S. Department of Transition with the main goal of guiding society through the economic and social changes that AI advancements are inevitably bringing. In this role, the government acts as both a facilitator of AI technology advancements and as a gatekeeper ensuring that their implementations are not harmful to society. Moreover, these measures must be put in place, now, as the rapid pace of AI advancement means that society cannot afford to wait, and substantial efforts should be made by the U.S. Government and AI developers to promote and support research on AI Ethical Reasoning. References Anthropic. (2024, March 4). The claude 3 model family: Opus, sonnet, haiku. Anthropic. Retrieved from: https://www-cdn.anthropic.com/de8ba9b01c9ab7cbabf5c33b80b7bbc618857627/Model_Card_Claude_3.pdf Arbelaez Ossa, L., Lorenzini, G., Milford, S. R., Shaw, D., Elger, B. S., & Rost, M. (2024). Integrating ethics in AI development: a qualitative study. BMC Medical Ethics , 25 (1), NA. https://link-gale-com.csuglobal.idm.oclc.org/apps/doc/A782196655/AONE?u=colstglobal&sid=bookmark-AONE&xid=e925a51dLinks to an external site. Bai, Y., Kadavath, S., Kundu, S., Askell, A., Kernion, J., Jones, A., Chen, A., Goldie, A., Mirhoseini, A., McKinnon, C., Chen, C., Olsson, C., Olah, C., Hernandez, D., Drain, D., Ganguli, D., Li, D. Tran-Johnson, E., Perez, E., … Kaplan, J. (2022, December 15). Constitutional AI: Harmlessness from AI feedback . ArXiv. https://doi.org/10.48550/arXiv.2212.08073 Big Think. (2023, April 9). Nick Bostrom on the birth of superintelligence [Video]. Big Think. https://bigthink.com/series/the-big-think interview/superintelligence/?utm_source=youtube&utm_medium=video&utm_campaign=youtube_description Future of Life Institute. (2023, April 12). Policy making in the pause. Future of Live Institute . https://futureoflife.org/document/policymaking-in-the-pause Kang, C. (2023, May 16). OpenAI’s Sam Altman urges A.I. regulation in Senate hearing. The New York Times . https://www.nytimes.com/2023/05/16/technology/openai-altman-artificial-intelligence-regulation.html Perrigo, B. (2024, March 11). Exclusive: U.S. must move ‘decisively’ to avert ‘extinction-level’ threat from AI, government-commissioned report says. Time Magazine. https://time.com/6898967/ai-extinction-national-security-risks-report/ Sevastopulo, D. (2021, March 3). China on track to surpass US as AI superpower, Congress told; Semiconductors. Financial Times , 4. https://link-gale-com.csuglobal.idm.oclc.org/apps/doc/A653575133/AONE?u=colstglobal&sid=bookmarkAONE&xid=042ad65a South by Southwest (SXSW). (2024, March 4). Amy Webb Launches 2024 Emerging Tech Trend Report | SXSW 2024 [Video]. SXWX. https://www.sxsw.com/news/2024/2024-sxsw-featured-session-amy-webb-launches-2024-emerging-tech-trend-report-video Stanford HAI. (n.d.). Andrew Ng . Stanford University. https://hai.stanford.edu/people/andrew-ng Stanford Online. (2023, August 29). Andrew Ng: Opportunities in AI – 2023 [Video]. YouTube. https://www.youtube.com/watch?v=5p248yoa3oE Vance, A., (2024, March 12). Gold-medalist coders build an AI that can do their job for them. Bloomberg . https://www.bloomberg.com/news/articles/2024-03-12/cognition-ai-is-a-peter-thiel-backed-coding-assistant Urban, T. (2015, January 27). The AI revolution: The road to superintelligence Part-2. Wait But Why . https://waitbutwhy.com/2015/01/artificial-intelligence-revolution-2.html Zelikman, E., Harik, G., Shao, Y., Jayasiri, V., Haber, N., & Goodman, N. (2024, March 14). Quiet-STaR: Language models can teach themselves to think before speaking . ArXiv. https://doi.org/10.48550/arXiv.2403.09629
- UML State Machine Diagrams: Modeling Dynamic System Behavior
This article provides an overview of UML State Machine Diagrams (SMDs), explaining their use in modeling the dynamic behavior of systems in software engineering. It covers the key concepts of SMDs, including notation, construction steps, common errors, and their relationship to sequence diagrams. Alexander S. Ricciardi February 8, 2025 In software engineering, Unified Modeling Language (UML) state machine diagrams, also known as state diagrams or statecharts, are used to model the dynamic of systems both in the problem space (MOPS) and the solution space (MOSS) (Unhelkar, 2018). UML State Machine Diagrams are helpful for visualizing how objects change state over time. This post explores UML State Machine Diagrams, including their notation, construction steps, common errors, and relationship to UML sequence diagrams. State Machine Diagrams Overview UML State Machine Diagrams (SMDs) are behavior diagrams that show the discrete behavior of a system by depicting the state transitions of a part of that system (UML®, n.d.). Two kinds of state machines are defined in UML. 2.5, behavioral state machine and protocol state machine. A behavioral state machine focuses on event-driven transition of an object (Dwivedi, 2019). A protocol state machine is a behavioral state diagram that specializes in modeling the sequence of event-driven transition of an object. This post focuses on behavioral state diagrams as they are more widely used and the notations of the two types are very similar. In software modeling, SMDs provide a dynamic illustration of the object within a system. They are used in MOPS (Model of Problem Space) to model the state states, conditions, and transitions of system entities, and in MOSS (Model of Solution Space), they are used to model the states, conditions, and transitions of objects including interface and control objects (Unhelkar, 2018). In other words, they are used to visualize the different states of objects within a system and how, in response to events, they transition between those states. Various components are utilized to create SMDs, the table below lists the main components that can be found in SMDs. Table 1 UML SMD Basic Notation Note: This table provides an illustration and a description of the basic notation elements that can be found within state machine diagrams. From several sources (Unhelkar, 2018; Dwivedi, 2019; GeeksForGeeks, 2025; Visual-Paradigm, n.d.; IBM, 2023, FastBitLab, 2022). When building an SMD, it is generally a good practice to follow these steps: Select an important/complex object. Understand the different stereotypes present in the selected object (Entity, boundary, control, or table). Identify states based on attribute values from the class documentation. Figure out how the object changes state. Draw transitions between states. Specify conditions for transitions, aka guards and related events and triggers. Group related states hierarchically using composite states. Clarify the diagram by adding notes. Consider modeling other objects/use cases. (Unhelkar, 2018) The table below lists the most common errors that can be made while building an SMD and how to rectify them. Table 2 SMD Common Error and Rectifications Note: The table lists the most common errors made while constructing an SMD and how to rectify them. From “Chapter 12 — Dynamic modeling With state Machine Diagrams. Software Engineering with UML” by Unhelkar (2028). Modified. The diagram below is an example of an SMD illustrating an online shopping order’s states. Figure 1 SMD Example of an Online Shopping Order Note: The figure is an illustration of a UML State Machine Diagram (SMD) depicting the states of an online shopping order. SMDs vs Sequence Diagrams Another type of UML diagram used to represent the dynamic aspect of a system is the sequence diagram. Sequence diagrams “provide a dynamic illustration of object interactions within a system. In SE, they are usually based on UML class diagrams and are used primarily to show the interactions between objects (classes) in the chronological order in which those interactions occur” (Ricciardi, 2025, p.1). These diagrams are also used in the MOPS to model the behavior of systems from the actors’ (users) perspective and in the MOSS to model objects' interactions in detail; details such as the sequence of messages (methods) within a system, the parameter list within messages, and the return values of the messages. Both the SMDs and sequence diagrams are useful for modeling the dynamic aspects of a system and depending on the specific needs of analysis and design task one is more suited than the other one. For example, to model the internal behavior of a single object, a state machine diagram is best, whereas to model multiple objects and the sequence of operations within a system, a sequence diagram is the better choice. To summarize, SMDs are used to understand and model the dynamic behavior of systems, particularly the state changes/transitions of individual objects. They help to model the states, transitions, events, and guard conditions of a system. Thus, software engineers need to understand the common errors that can occur when building SMDs and best practices, as well as the relationship to other UML diagrams like sequence diagrams. Ultimately, SMDs are a powerful tool for analyzing (in MOPS) and designing (in MOSS) the dynamic behavior of individual objects within systems. References: Dwivedi, N. (2019, September 9.). Software design: Modeling with UML. State machine diagram. Modeling with the Unified Modeling Language (UML) . LinkedIn Learning. https://www.linkedin.com/learning/software-design-modeling-with-uml/state-machine-diagram?u=2245842 FastBitLab (2022, January 20). FSM Lecture 11- UML state machine types of transitions. FasBitLab. https://fastbitlab.com/fsm-lecture-11-uml-state-machine-types-of-transitions/ GeeksforGeeks (2025, January 3). State machine diagrams | Unified Modeling Language (UML). GeeksforGeeks. https://www.geeksforgeeks.org/unified-modeling-language-uml-state-diagrams/ IBM (2023, September 2018). Creating transitions between states. IBM DevOps Model Architect. IBM Documentation. https://www.ibm.com/docs/en/dma?topic=diagrams-creating-transitions-between-states Ricciardi, A. (2025, January 27). A Guide to UML Sequence Diagrams: Notation, strengths, and Limitations. Code Chronicles - Omegapy. https://www.alexomegapy.com/post/a-guide-to-uml-sequence-diagrams-notation-strengths-and-limitations UML® (n.d.) State machine diagrams . UML diagrams. UML Diagrams Org. https://www.uml-diagrams.org/state-machine-diagrams.html Unhelkar, B. (2018). Chapter 12 — Dynamic modeling with state machine diagrams. Software engineering with UML . CRC Press. ISBN 9781138297432 Visual-Paradigm (n.d.). What is state machine diagram? Visual-Paradigm . https://www.visual-paradigm.com/guide/uml-unified-modeling-language/what-is-state-machine-diagram/
- Object-Oriented Principles in Software Engineering: An Overview of OBDMS, RDBMS, and ORM Techniques
This article explores the differences between Object-Oriented Databases (OOMDBs) and Relational Databases (RDBMS), highlighting their strengths and weaknesses and examines how Object-Relational Mapping (ORM) techniques can be used to bridge the gap between Object-Oriented Programming (OOP) and Relational Databases. Alexander S. Ricciardi January 30, 2025 Software engineers need to have a good understanding of how Object-Oriented Programming (OOP) relates to Object-Oriented Databases (OBDMS) and Relational Databases (RDBMS) to design efficient software systems . This article explores the core principles of the Object-Oriented concept (OO), the advantages and disadvantages of OBDMS and RDBMS, and Object-Relational Mapping (ORM) techniques for mapping object-oriented data to RDBMS. Overview of the Object-Oriented Concept In Software Engineering (SE), the Object-Oriented concept (OO) is a paradigm where systems and real-world entities (e.g. users) are defined as “objects.” These objects are abstractions that, in the context of a software application, encapsulate both data (attributes) and operations that can be performed on that data (methods). The data are the attributes that define the characteristics of the objects and the operation on the data are the methods (procedures or functions) that define the behavior of an object (Colorado State University Global, n.d.). In other words, objects contain both executable code (methods) and data (attributes). OO is composed of six main concepts: Classification ꟷType of objectꟷ Abstraction ꟷ Hiding the object's internal implementation details, including some of its attributes and the functionalities of its methods, while representing those attributes and methods internally ꟷ Encapsulation ꟷDefining the boundary of an object (modularization), defining an object’s attributes and methodsꟷ Association ꟷRelationships defining objects' interactions with each otherꟷ Inheritance ꟷRelationships defining objects as a generalization (parents) of other objects (children)ꟷ Polymorphism ꟷHow objects respond differently to the same message (same method call)ꟷ The Differences Between OO, OOP, and OODB (ODBMS) Object-Oriented Programming (OOP) embodies the principles of the OO concept. OOP is a style of programming that encapsulates data (attributes) and code (methods) within classes which are blueprints for creating (instantiate) objects. In other words, the OO approach is a general concept, OOP is a specific way of implementing it. On the other hand, Object-Oriented Databases (OODBs) also called Object Database Management Systems (OBDMS) “store data as objects, similar to how certain programming languages manage data. Instead of tables with rows and columns like traditional databases, object databases use complex data structures to represent data” (MongoDB, n.d.). Overview of Object-Oriented Databas e OBDMS are databases based on the OO paradigm and store data as objects. They are “able to store objects together with their attribute values, operations, and relationships” (Unhelkar, 2018, p.219). The databases store objects “as they are” preserving the object's structure. In SE, this facilitates the design of OO-based software systems, as objects can be loaded directly from the database into memory and executed "as they are." This is useful in software design because, in addition to storing object-based data, OBDMS can directly store (“as they are”) other complex data types like Binary Large Objects (BLOBs) and unstructured data (e.g., video and audio). Unlike relational databases that use a tabular (rows and columns) format, which is not suited for storing these two data types. OBDMS have several other advantages besides storing complex data, as well as disadvantages, the table below lists these advantages and disadvantages. Table 1 ODBMS Advantages and Disadvantages Note: The table lists the advantages and disadvantages of Object Database Management Systems (ODBMS). From several sources (Colorado State University Global, n.d.; Unhelkar, 2018; Worldlovely, 2024; Akshitakumawat, 2023) As shown by Table 1, OBDMS are ideal for storing complex data such as complex unstructured data (AD/CAM, multimedia, scientific databases). However, they lag the standardization, the simplicity, and the relatively low cost found in Relational Databases Management Systems. Overview of Relational Database Relational Databases (RBs) also called Relational Databases Management Systems (RDBMS) are databases that store and organize predefined relationships in the form of tables that store data points in pre-defined categories through rows and columns (Microsoft, n.d.; Google n.d.). Relationships are established through logical connections between tables, typically using primary keys and foreign keys. RDBMS structure data based on these relationships, making it easier to query and manage data using Structured Query Language (SQL). RBMS uses the concept of primary key and foreign key. A primary key is a unique identifier for each record in a table (each row) (InterSystems, n.d.). A foreign key establishes a link between two tables, allowing related data to be accessed using the keys. RBMS have several advantages and disadvantages, the table below lists some of them. Table 2 RDBMS Advantages and Disadvantages Note: The table lists the advantages and disadvantages of Relational Databases Management Systems (InterSystems, n.d.; Pedamkar, 2023; EASA, 2022; Google, n.d.; OCI, 2021; Singh; 2024, Pedamkar, 2023; Goray, 2012) RDBMS can be used to store object-based data; however, they store data in tables that are structurally different from objects, requiring objects to be translated from classes to tables (Unhelkar, 2018). Additionally, the data and behavior represented by a class cannot be directly transferred to a table because relational databases can only store data. However, it is possible to map object-oriented designs into RDBMS, but it is a difficult task. Mapping Objects to RDBMS Object-Relational Mapping (ORM) is a technique that bridges the gap between OOP and RDBMS (Rajputtzdb, 2024). One of the simplest ORM forms of mapping is one-to-one mapping, where classes are mapped to tables, class attributes are mapped to the table columns, and the instantiated objects are mapped to rows in the corresponding table. See Figure 1 for an example of it. Figure 1 RDBMS Object Mapping Note: The figure depicts how objects are mapped to RDBMS table using the ORM One-To-One mapping form. To map and simulate object behavior with RDBMS ORM combined with the CRUD functions can be implemented. ORM the association relationships between classes using the foreign key in tables. The figure below depicts how foreign keys emulate the association relationship between classes Figure 2 Foreign Keys and OO Association Relationship Note: the figure depicts how foreign keys emulate OO association relationships. To emulate the aggregation and other association relationships within RDBM, CRUD functions which stand for Create—creates an object. Read—search for an object (record) from storage based on a criterion (key). Update—search and update objects (records). Delete—locates and remove a persistent object (Unhelkar, 2018) These operations are executed using languages such as SOL. The figure below depicts a class diagram illustrating how CRUD operations and association relationships are linked to RDBMS. Figure 3 CRUD and RDBMS Class Diagram Note: The figure depicts a class diagram illustrating how CRUD operations are emulated within objects and how association relationships are linked to RDBMS using CRUD and key attributes. To summarize, Object-Oriented Databases (ODBMS) directly support object data types; on the other hand, Relational Databases (RDBMS) are prevalent due to their widely adopted standards and robustness; however, they store data in tables that are structurally different from objects, requiring objects to be translated from classes to tables. Nonetheless, Object-relational mapping (ORM) allows RDBMS to effectively manage object-oriented data by bridging the gap between objects and tables. References: Akshitakumawat (2023, May 1). Definition and Overview of ODBMS. GeeksForGeeks. https://www.geeksforgeeks.org/definition-and-overview-of-odbms/ Colorado State University Global (n.d.). Module 7.1 Data Storage Mechanisms. [Interactive lecture]. CSC470 Software Engineering, CSU Global, Departement of Computer Science. Canvas. Retrieved January 29, 2025, from: https://csuglobal.instructure.com/courses/104036/pages/7-dot-1-data-storage-mechanisms?module_item_id=5372300 EASA (2022, January 25). 8 advantages of a Relational Database. EASA Blog. https://www.easasoftware.com/insights/8-advantages-of-a-relational-database/ Google (n.d.). What is a relational database? Google Cloud. https://cloud.google.com/learn/what-is-a-relational-database InterSystems (n.d.). What is a relational database and why do you need one? InterSystems. https://www.intersystems.com/resources/what-is-a-relational-database/ Microsoft (n.d.). What is a relational database? Microsoft Azure. https://azure.microsoft.com/en-us/resources/cloud-computing-dictionary/what-is-a-relational-database MongoDB (n.d.). The basics of object-oriented databases. MongoDB. https://www.mongodb.com/resources/basics/databases/what-is-an-object-oriented-database#:~:text=An%20object%2Doriented%20database%20stores,data%20structures%20to%20represent%20data . OCI (2021, June 18). What is a relational database? (RDBMS)? Oracle. https://www.oracle.com/database/what-is-a-relational-database/ Pedamkar, P. (2023, July 6). Relational database advantages. EDUCBA. https://www.educba.com/relational-database-advantages/ Rajputtzdb (2024, February 28) What is Object-Relational Mapping (ORM) in DBMS? GeeksForGeeks. https://www.geeksforgeeks.org/what-is-object-relational-mapping-orm-in-dbms/ Singh, P. (2024, April 24). 15 Advantages and Disadvantages of RDBMS. Internshala Trainings Blog. https://trainings.internshala.com/blog/advantages-and-disadvantages-of-rdbms/ Goray, S. (2021, December 10). Top 10+ Advantages and Disadvantages of Using RDBMS. WAC. https://webandcrafts.com/blog/advantages-disadvantages-rdbms Unhelkar, B. (2018). Chapter 13 — Database modeling with class and sequence diagrams. Software engineering with UML . CRC Press. ISBN 9781138297432 Worldlovely (2024, December). Database management system [Discussion Post]. Hack The Forum. https://www.hacktheforum.com/database-management-system/object-oriented-dbms/#google_vignette
- Polymorphism: Using UML Class Diagrams and Pseudocode
This article explores polymorphism in object-oriented software development, differentiating between compile-time and run-time polymorphism types, and describing the four categories of polyformism: subtype, ad hoc, parametric, and coercion. It also examines how UML class diagrams and pseudocode can be used to illustrate polymorphic relationships. Alexander S. Ricciardi January 19, 2025 In object-oriented software development, complex dependencies can exist between classes or objects (the instantiation of those classes) due to inheritance, association, and aggregation relationships (Labiche et al., 2000). Inheritance, in particular, often creates complex dependencies. However, polymorphism can be used to manage these dependencies particularly those related to inheritance. This article explores the concept of polymorphism within computer science, more specifically within object-oriented software development, through the use of pseudocode and UML class diagrams. Overview of Polymorphism in Computer Science The term polymorphism is derived from the Greek words "poly," meaning "many," and "morph," meaning "form" translating in English to many many-shape or many-forms. In computer science, polymorphism refers to the ability of data or a system to be processed in more than one form. Within computer science, polymorphism is an essential part of Object-Oriented Programming (OOP), it allows objects to respond to the same message (or method call) in their own way (Gupta, 2024). This polymorphic behavior can be achieved at compile-time, for example, through parameter overloading (static polymorphism), or at run-time through operator overloading and method overriding (dynamic polymorphism). Compile-time polymorphism, or static polymorphism, is when multiple methods have the same name but have different parameter numbers, types, or both (a method can handle values of many types without needing to be overridden). Whereas, compile-time polymorphism, or dynamic polymorphism, is when the functionality of a method is determined at runtime by the object invoking it. This type of polymorphism, method overring, is typically associated with the inheritance relationship, interfaces, and abstract class. It is important to understand that the relation between an interface and a class is a contract that specifies what the class should do based on a set of methods declared in the interface. Inheritance is a parent-child relationship or "is-a" relationship where the child class inherits the methods of the parent class. An abstract class is a class that can not be instantiated on its own, it is a superclass that serves as a blueprint for subclasses by defining methods, the relation between an abstract class and its subclass is a parent-child relationship. Types of Polymorphism in OPP Compile-time polymorphism and run-time polymorphism describe ‘when’ an object is transformed, but they also define ‘what’ component of an object is transformed. The ‘when’ and ‘what’ of an object transformation can be categorized into four different Polymorphism types. Figure 1 illustrates these four types and how they are related. Figure 1 Types of Polymorphism Note : The relationships illustrated in the diagram by the arrows are parent-child relationships. The inheritance relationships illustrated in Figure 1 are generalized and simplified illustrations of the relationships that exist between the different types of polymorphism. These relationships can be more complex depending on the programming language used to develop a particular software. Table 1, below, shows a more detailed description of the different types. Table 1 Types of Polymorphism Descrptions Note: Data from several sources(Johnson, 2020; Gupta, 2024; Umbarger, 2008) As shown in Table 1 defining the specific type of polymorphisms used by a relationship can be challenging and is often related to the programming language used to develop the software. Polymorphism in Software Development In software engineering, polymorphism is a fundamental concept that is defined as “the ability of an instantiated object (at runtime) to understand and interpret the message sent from a calling object. This interpretation of a message by an object depends on its own characteristics and definition” (Unhelkar, 2018 b, p. 182). When incorporating polymorphism in software design tools such as pseudocode and Unified Modeling Language (UML) class diagrams are often used to visualize and document polymorphic relationships. Pseudocode is defined as a step-by-step description of an algorithm (Kartik, 2024). It helps programmers to design easy-to-understand and easy-to-read code solutions to the problems. UML Class Diagram Overview UML class diagram is one of six types of structural diagrams used in software engineering (IBM, 2021). They are one of the most important diagrams as they can be used to model a software system's static structure (Shmallo & Shrot, 2020). In other words, they are the blueprints of systems and their subsystems (Ricciardi 2025). Moreover, in software engineering, they can be used within the problem space and the solution space. The table below describes the different components found in UML class diagrams. Table 1 UML Class Diagram Notation Note: This figure illustrates the different notation elements found in ULM class diagrams. From “UML Class Diagrams: Modeling Systems from Problem Space to Solution Space” by Ricciardi (2025). As shown in Table 1 UML class programs provide an extensive set of notations that can be used to represent classes (objects/entities), their attributes, their operations, and various types of relationships between them. Polymorphic Class Diagrams Polymorphic class diagrams are used within the solution space to illustrate polymorphic relationships. These diagrams must contain inheritance relationships, interfaces, abstract classes, or a partial or full combination of the three. The figure below, Figure 2, is a ULM class diagram of a simple order system. Figure 2 Order UML Class Diagram Note: the figure illustrates a shopping order system UML Class Diagram. Made with Lucidchart app. As shown in Figure 2, class diagrams do not show directly polymorphism details, they imply polymorphism such as subtype polymorphism by restating a parent method in a child class. For example, the child class CreditCarPayment restates the method processPayment(Double: amount) inherated from its parent abstract class ElectronicPayment implying that the method is overridden by it. To illustrate polymorphism in detail, developers often use pseudocode, which allows them to demonstrate the specific logic and behavior of each method. Example Pseudocode Psudeocode is unusually used in combination with class diagrams. Depending on the developers' preference, pseudocode can be generated before, after, or during the creation of class diagrams; however, both tools are used to develop the software source code in the programming language chosen for the project. Below is an example of the simple order system pseudocode. This pseudocode example focuses on illustrating, using mostly comments, where subtype polymorphism is implemented, rather than detailing the functionality of each method. Code Snippet 1 Simple Order System Pseudocode //------------------------------------------------------------------------------ // Order Class //------------------------------------------------------------------------------ class Order: private String orderId private Date orderDate private String orderStatus private Double amount private Boolean isPaid := false private Payment payment := Payment() // an object of the class Payment is instantiated // payment is declared as the parent type, // Subtype Polymorphism potential - Run-time Polymorphism // Constructor Order() //... Constructor logic calculateAmoun() // Runs methods protected calculateAmount(): amount := // ... Logic to calculate the amount public addPayment(String type, Payment paymentToAdd): payment := paymentToAdd(type, amount) isPaid := true //------------------------------------------------------------------------------ // Payment Class //------------------------------------------------------------------------------ class Payment: private String paymentId private String paymentType // Constructor Payment() //... Constructor logic //------------------------------------------------------------------------------ // PaymentProcessor Interface //------------------------------------------------------------------------------ Interface Class PaymentProcessor: /* The abstract keyword means the methods have no functionality implemented Subtype Polymorphism - potential (compile-time) */ public processPayment(Double amount): //... No logic implementation //------------------------------------------------------------------------------ // ElectronicPayment Abstract Class //------------------------------------------------------------------------------ abstract class ElectronicPayment extends Payment implements PaymentProcessor: private String transactionId private String electronicPaymentType // Constructor ElectronicPayment() //... Constructor logic // Subtype Polymorphism - Run-time Polymorphism @override public processPayment(Double amount) //... Logic to process electronic payment returns true //------------------------------------------------------------------------------ // CashPayment Class //------------------------------------------------------------------------------ class CashPayment extends Payment implements PaymentProcessor: // Constructor CashPayment() //... Constructor logic // Subtype Polymorphism - Run-time Polymorphism @override public processPayment(Double amount) //.... Logic to process a cash payment return true //------------------------------------------------------------------------------ // CreditCardPayment Class //------------------------------------------------------------------------------ class CreditCardPayment extends ElectronicPayment: private Integer cardNumber private Date expirationDate // Constructor CreditCardPayment(I) //... Constructor logic // Subtype Polymorphism - Run-time Polymorphism @override public processPayment(Double amount) /* ... Logic to process electronic payment ... Adds logic for to process credit card payment using cardNumber, expiryDate, and Amount */ return true /* Subtype Polymorphism - Run-time Polymorphism and Parametric Polymorphism (method-parameter overloading) - Compile-time Polymorphism */ @override public processPayment(Double amount, String currency) /* ... Logic to process electronic payment ... Adds logic for processing credit card payments using cardNumber, expiryDate, amount, and currency type */ return true //------------------------------------------------------------------------------ // PayPalPayment Class //------------------------------------------------------------------------------ class PayPalPayment extends ElectronicPayment: private String email // Constructor PayPalPayment() //... Constructor logic // Subtype Polymorphism - Run-time Polymorphism @override public processPayment(Double amount) : Boolean /* ... Logic to process electronic payment ... Adds logic to process PayPal payment using email */ return true //------------------------------------------------------------------------------ // Main class - Example usage of the code //------------------------------------------------------------------------------ class Main: public static main(): // 1. Create Orders (instantiate Order objects) Order myOrder1 Order myOrder2 Order myOrder3 / / 2. Create Payments (instantiate Payment objects) Payment payment1 Payment payment2 Payment payment3 /* 3. Let's assign electronic and cash payments to payment objects The compiler will check for these payment objects' relationships Payment class and the PaymentProcessor interface. It will ensure that the objects inherit all the methods defined in the abstract class (ElectronicPayment) and the methods declared in the interface (PaymentProcessor) As the inherited methods are transformed by the ElectronicPayment class, This can be considered Subtype Polymorphism (Run-time Polymorphism) Note that the electronic payment objects are instantiated as Payment/ElectronicPayment Objects with ElectronicPayment class functionality, as ElectronicPayment is an abstract class and it cannot be instantiated on its own. */ Payment1 := new ElectronicPayment() Payment2 := new ElectronicPayment() Payment3 := new CashPayment() /* 4. Let's assign credit card payments to electronic payments. This object inherited all the methods from Payment/ElectronicPayment objects, As the inherited methods are transformed by the CreditCardPayment class, this is can be considered a Subtype Polymorphism (Run-time Polymorphism) */ Payment1 := new CreditCardPayment() Payment2 := new CreditCardPayment() // 5. Let make a payment payment2.processPayment(myOrder3.amount) // cash /* => subtype of ElectronicPayment using the interface PaymentProcessor (Subtype Polymorphism - run time) */ payment1.processPayment(myOrder1.amount) /* => subtype of ElectronicPayment using the interface PaymentProcessor (Subtype Polymorphism - run time) */ // Use the overloaded processPayment payment2.processPayment(myOrder2.amount, "Euro") // currency /* => subtype of ElectronicPayment using the interface PaymentProcessor (Subtype Polymorphism - run time) => and method - parameter overloading (Compile-time Polymorphism) */ // 6. Assigned payment to order (aggregation) myOrder1.addPayment(payment1) myOrder2.addPayment(payment2) myOrder3.addPayment(payment3) Note: The code snippet is the pseudocode for a simple shopping order system. Polymorphism at Run-time Polymorphism at run-time is achieved through dynamic polymorphism, where the specific method to be executed is determined during program execution rather than at compile time. As shown by the Code Snippet 1 and Figure 1, in the context of SE, both tools are needed to show polymorphism at run-time. The class diagrams illustrate the relationships between classes, especially inheritance, a child-parent relationship, which is a fundamental concept in OOP and object-oriented design allowing classes to be derived from others, gaining their attributes and methods (Fallucchi & Gozzi, 2024). The inherited methods can be overridden by the child class at run-time, demonstrating subtype polymorphism (run-time polymorphism a type of dynamic polymorphism). This is also applicable to interfaces such as the interface classes in the Java programming languages. In the programming language C++, for example, “dynamic polymorphism is implemented by adding the virtual keyword to the function that is intended to be overridden” (Masri et al., 2918, p. 241). Additionaly, class diagrams can imply subtype polymorphism by restating a parent method in a child class. On the other hand, pseudocode can show polymorphism by illustrating the detailed behavior of a piece of code or a method. Therefore, in object-oriented design, both tools a re essential to completely represent and fully model the polymorphic structures of a system. Conclusion In object-oriented software development, the classes’ inheritance, association, and aggregation relationships create complex dependencies and polymorphism can be used to manage these dependencies particularly those related to inheritance. In computer science, polymorphism is the ability of a system to offer the same interface for accessing different underlying data, objects, processes, or functionalities forms; it is a cornerstone of object-oriented programming. Therefore, it is essential for software developers to understand the role polymorphism plays in OOP, to be capable of identifying and utilizing different types, such as subtype, Ad hoc, parametric, and coercion polymorphism. Furthermore, it is crucial to understand the difference between static and dynamic polymorphism and how to use tools like class diagrams and pseudocode to illustrate polymorphic relationships within systems. Ultimately, a firm understanding of polymorphism, coupled with the use of modeling tools like UML class diagrams and pseudocode, allows developers to analyze complex systems and tackle challenging software design projects. References Fallucchi, F., & Gozzi, M. (2024, June 11). Puzzle Pattern, a Systematic Approach to Multiple Behavioral Inheritance Implementation in Object-Oriented Programming . Applied Sciences, 14(12). https://doi.org/10.3390/app14125083 Gupta, E. (2024, March 11). Difference between inheritance and polymorphism. Shiksha online. https://www.shiksha.com/online-courses/articles/difference-between-inheritance-and-polymorphism-blogId-153349 IBM (2021, March 5). Class Diagrams. Rational software modeler. IBM Documentation. https://www.ibm.com/docs/en/rsm/7.5.0?topic=structure-class-diagrams Johnson, J. (2020, October 23). Polymorphism in programming. BMC Blogs. https://www.bmc.com/blogs/polymorphism-programming/ Kartik, (2024, September 12). What is pseudocode: A complete tutorial. GeeksForGeeks. https://www.geeksforgeeks.org/what-is-pseudocode-a-complete-tutorial/ Labiche, Y., Thévenod-Fosse, P., Waeselynck, H., & Durand, M.-H. (2000). T esting levels for object-oriented software. Proceedings of the 22nd International Conference on Software Engineering, 136–145. https://doi.org/10.1145/337180.337197 Masri, S. A., Nadi, S., Gaudet, M., Liang, X., & Young, R. W. (2018). Using static analysis to support variability implementation decisions in C++. Proceedings of the 22nd International Systems and Software Product Line Conference - Volume 1, 236–245. https://doi.org/10.1145/3233027.3233043 Ricciardi, A. (2025, January 18). UML class diagrams: Modeling systems from problem space to solution space. Omegapy. https://www.alexomegapy.com/post/uml-class-diagrams-modeling-systems-from-problem-space-to-solution-space Shmallo, R. S., & Shrot, T. (2020). Constructive Use of Errors in Teaching the UML Class Diagram in an IS Engineering Course. Journal of Information Systems Education, 31(4), 282–293. https://doi.org/https://www.jise.org/Volume31/n4/JISEv31n4p282.html Umbarger, D. (2008). An Introduction to Polymorphism in Java [PDF]. Computer Science Teacher. The College Board. https://apcentral.collegeboard.org/media/pdf/Intro_to_Polymorphismin_Umbargar.pdf Unhelkar, B. (2018 a). Chapter 1 — Software engineering fundamentals with object orientation. Software engineering with UML. CRC Press. ISBN 9781138297432 Unhelkar, B. (2018 b). Chapter 11 — Class model-3: Advanced class designs. S oftware engineering with UML . CRC Press. ISBN 9781138297432
- Understanding UML Sequence Diagrams: A Hospital Management System Case Study
This article provides an overview of UML sequence diagrams, explaining their notation, strengths, and limitations in modeling dynamic system interactions. It also demonstrates their practical application through a detailed case study of a doctor-patient examination workflow within a Hospital Management System, including a corresponding class diagram and pseudocode. Alexander S. Ricciardi January 31, 2025 Unified Modeling Language (UML) sequence diagrams are extensively used in Software Engineering (SE) to model the dynamic interactions of objects within systems. They illustrate a sequence of messages between objects within an interaction (IBM, 2021). This essay provides an overview of UML sequence diagrams and a UML sequence diagram, along with its related pseudocode and class diagram, illustrating a doctor-patient examination interactions workflow within a hospital management system. UML Sequence Diagrams Overview UML Sequence Diagrams “are usually based on UML class diagrams and are used primarily to show the interactions between objects (classes) in the chronological order in which those interactions occur” (Ricciardi, 2025, p. 1). They provide a dynamic illustration of the interactions between classes (objects) within a given period of time. In SE, they are used, in the problem space, to analyze and model system behavior from the actor’s (user’s) viewpoint (Unhelkar, 2018). In the solution space, they are used to illustrate interactions within a system in more detail, such as the sequence of the inquiry messages illustrating method calls, the parameter messages within those methods, and the value returned by those methods. The diagram uses a system of notation such as actors (classes), lifelines (timelines), arrows denoting messages or method calls between these lifelines, activation bars indicating method execution, and optional annotations for conditions, loops, or return values. These elements work together to illustrate the flow interaction within a system. The elements are arranged vertically to illustrate the chronological order of interactions and horizontally to reflect the direction of the interactions between objects. The figure below, Figure 1, depicts the main elements of a UML sequence diagram. Figure 1 UML Sequence Diagram Notation Elements Note: The figure illustrates the elements that can be found in UML sequence diagrams and how they may interact within a diagram. From “A Guide to UML Sequence Diagrams: Notation, Strengths, and Limitations” by Ricciardi (2025). It is important to note that classes’ and objects' names are underlined and they can be illustrated by a stick figure for outside actors and internal actors can be encapsulated in a rectangle or represented by various circular shapes or icons representing specific stereotypes (e.g. boundary, control, and entity). A stereotype in UML “denotes a variation on an existing modeling element with the same form but with a modified intent” (Agile Modeling, 2023, p.1). Usually, stereotypes are represented using guillemets (<< >>) encapsulating a keyword; for instance, the specific stereotypes of a sequence diagram, represented by the circular shapes, are <>, <>, and <>. The table below, Table 1, provides detailed descriptions of the notation elements depicted in Figure 1, including the sequence diagram icon stereotypes. Table 1 UML Sequence Diagram Notation Descriptions Note: The table describes the notation elements that can be found in UML sequence diagrams. From “A Guide to UML Sequence Diagrams: Notation, Strengths, and Limitations” by Ricciardi (2025). Sequence diagrams have advantages and disadvantages, they are well-suited for modeling the dynamic behavior of a system by illustrating interactions between different actors or classes over a period of time. They help identify missing elements in class diagrams and they can be used for documentation (Ricciardi, 2025). On the other hand, they struggle to represent parallel processes or complex conditional flows. This is especially true for parallel interactions, as the dynamic and sequential nature of sequence diagrams makes it difficult to depict concurrent events within a system. Furthermore, trying to illustrate multiple concurrent and complex conditional flows using frames (or fragments) in a single diagram can make it cluttered and ultimately it may require the generation of several additional sequence diagrams. See Table 2 for a list of the main advantages and disadvantages of sequence diagrams. To summarize UML sequence diagrams are useful for illustrating dynamic interactions of objects within a system that have their advantages and disadvantages. The next section of this paper explores a hospital management system UML sequence diagram, including its related pseudocode and a UML class diagram. Table 2 Strengths and Limitations of UML Sequence Diagrams Note: The table describes the main advantages and disadvantages of UML sequence diagrams. Hospital Management System (HMS) is a digital application that helps hospitals manage daily operations efficiently (History Medical History, 2024). It is a platform that connects and manages all departments within a hospital, including medical, financial, patient, and administrative departments. As it will be nearly impossible to illustrate every interaction happening within the HSM using a single sequence diagram, this section explores through a sequence diagram how a doctor and a patient may interact with an HMS during an appointment. In other words, the sequence diagram illustrates a doctor-patient examination workflow within an HMS, showing how a doctor and a patient may interact with the HMS interfaces during an appointment. Figure 2 Doctor-Patient Examination HMS Class Diagram Version-2 Note: This UML class diagram, version 2, illustrates a doctor-patient examination system within a Hospital Management System (HMS). Made with Lucidchart app. As noted earlier in this paper sequence diagrams are usually based on UML class diagrams. Figure 2 depicts the class diagram that models the static structure of a doctor-patient examination system within a HMS. In Agile-Scrum methodology, this second iteration (version 2) of the class diagram, along with its associated pseudocode and sequence diagram, indicates that the doctor-patient examination feature was refined or modified during the design phase based on usage scenarios captured in the previous sequence diagram version. Below is the pseudocode associated with the feature. Code Snippet 1 HMS Doctor-Patient Examination System Pseudocode Version-2 Note: The pseudocode provides a code description of the interfaces and classes for the HMS Doctor-Patient Examination System. The full code can be found on GitHub here: HMS Doctor-Patient Examination System Pseudocode The HMS Doctor-patient examination system pseudocode comments label the Patient Class and the Patient Class as external actors as the objects instantiated by those start their interactions with the system by creating DoctorSysInterface and PatientSysInterface objects allowing them to interface with the HSM. Note that the PatientSysInterface Class and PatientSysInterface Class extend the HospitalSysManager Class. These relationships are illustrated in the class diagram by the aggregation and inheritance relationships, and it is these relationships that enable the Doctor and Patient actors to interact with the HMS Doctor-patient examination system as illustrated in the following sequence diagram. Figure 3 Doctor-Patient Examination HMS Sequence Diagram Version-2 Note: This UML sequence diagram, version 2, illustrates a doctor-patient examination interaction within a Hospital Management System (HMS). Made with Lucidchart app. The doctor-patient examination system HMS version-2 sequence diagram is a design level (solution space) UML sequence diagram that models the interactions between the external actors, a doctor and a patient, and a doctor-patient examination HMS. The interaction workflow initiates with the message from a found message represented by the method examine(Patient patient), a found message, in this context, is a message generated outside of the system. Similarly, the docApp(Doctor doctor) message initiates the workflow from the perspective of the patient. Note that this interaction could be represented as a parallel interaction in the diagram using a parallel (par) frame creating an interaction fragment within the diagram. However, this is not necessary as it will unnecessarily complicate the diagram and add cluttered to it without adding significant value to the understanding and illustration of the interaction. Additionaly, the diagram illustrates boundaries in the form of the interface "patInterface : PatienSysInterface", "docInterface : DoctorSysInterface" , and " diagnosisManager : DiagnosisManagerInterface" showing the layers of abstraction between the external actors themself (the doctor and the patient) and between them and the HMS core system (" aHospitalSysManager : HospitalSysManager" ), as well as with the schedule manage (" scheduleManager : ScheduleManagerInterface" ). The external also used those boundaries as interfaces to interact with the system. The diagram also illustrates combined fragments; for instance, the loop frame (" isSymptomDiagonsisDrugProcedure[0] = true" ) encapsulating the option frame " isSymptomDiagonsisDrugProcedure[0] = true " which further encapsulates the option frame "isSymptomDiagonsisDrugProcedure[1] = true". Furthermore, the sequence diagram illustrates well internal and external actors, objects, timelines, focus of controls, messages, self-messages, return messages, asynchronous messages, object destruction, steps (in a sequence), and notes effectively modeling the dynamic interactions within the doctor-patient examination process of the HMS. Conclusion UML sequence diagrams are useful for illustrating dynamic interactions of objects within a system. Sequence diagrams help in identifying missing elements, detailing object interactions, and modeling object destruction. However, they are less effective at representing parallelism, complex conditional logic, or entire complex systems in a single diagram. This essay has also explored the utility of UML sequence diagrams in modeling the dynamic behavior of systems, using a Hospital Management System's doctor-patient examination scenario. It provided a detailed sequence diagram, class diagram, and pseudocode demonstrating how these different tools can be used in the design phase to effectively represent complex interactions, and refine system requirements. As shown by the provided example, in software engineering, they are essential for designing, analyzing, and documenting interactions within a system. References: Agile Modeling. (2023, November 23). UML Stereotypes: Diagramming style guidelines. The Agile Modeling (AM) Method - Effective Strategies for Modeling and Documentation. https://agilemodeling.com/style/stereotype.htm IBM (2021, March 5). Sequence diagrams. Rational software modeler . IBM Documentation. https://www.ibm.com/docs/en/rsm/7.5.0?topic=uml-sequence-diagrams Ricciardi, A. (2025, January 27). A Guide to UML Sequence Diagrams: Notation, strengths, and Limitations . Code Chronicles - Omegapy. https://www.alexomegapy.com/post/a-guide-to-uml-sequence-diagrams-notation-strengths-and-limitations Medical History (2024, November 1). What is a hospital management system and how is HMS good for businesses? Smart Medical History. https://smartmedhx.ai/trends/what-is-a-hospital-management-system/ Unhelkar, B. (2018 ). Chapter 12 — Interaction modeling with sequence diagrams. Software engineering with UML . CRC Press. ISBN 9781138297432
- A Guide to UML Sequence Diagrams: Notation, Strengths, and Limitations
This article provides an overview of UML sequence diagrams, a type of interaction diagram used in software engineering to model the flow of messages between objects within a system. It explores the notation, strengths, and limitations of these diagrams, highlighting their utility in visualizing dynamic system behavior while also acknowledging their constraints in representing parallel processes. Alexander S. Ricciardi January 24, 2025 Unified Modeling Language (UML) sequence diagrams illustrate the sequence of messages in an interaction (IBM, 2021). They are a form of interaction diagram used in Software Engineering (SE) to model the interactions between objects in a single use case. This post provides an overview of the UML sequence diagrams and their strengths and limitations in software development. UML Sequence Diagrams Overview UML sequence diagrams provide a dynamic illustration of object interactions within a system. In SE, they are usually based on UML class diagrams and are used primarily to show the interactions between objects (classes) in the chronological order in which those interactions occur. In the problem space, they are used to model the behavior of systems from the actors’ (users) perspective (Unhelkar, 2018). In solution space, the diagrams are more detailed and used to illustrate objects' interactions and their messages in detail such as the sequence of those messages, a parameter list within messages, and the return values of the messages. The figure below illustrates the different elements that can be found in a UML sequence diagram. Figure 1 UML Sequence Diagram Notation Note: The figure illustrates the different elements that can be found in UML sequence diagrams. Made with the Lucidchart app. The table below describes some of the main notation elements that can be found in UML sequence diagrams. Table 1 UML Sequence Diagram Notation Description Note: The table describes some of the main notation elements that can be found in UML. A stereotyped object or class is an object with a specific purpose or functionality defined by a stereotype (e.g. boundary, control, and entity). The data was collected from several sources (Visual-Paradigm n.d.; Unhelkar, 2018; rmb1905, 2009). Strengths and Limitations of UML Sequence Diagrams UML sequence diagrams are excellent for visualizing the dynamic behavior of a system, particularly the interactions between objects or components over time. They can be used for analyzing and designing object interactions within a system, they are especially helpful in identifying missing elements in class diagrams and they can be used for documentation. See Table for a description of diagram strengths and limitations. For example, when designing a shopping cart system, they are especially useful at showing in detail the user (actor) interacting with the shopping cart and checkout system (objects). A sequence diagram can clearly depict the sequence of messages, for instance, addItem, viewCart, initiateCheckout, processPayment, etc., that is the exchanges between the user, the shopping cart, and the checkout system. However, sequence diagrams also have their limitations, they are not well-suited for representing highly concurrent or parallel processes. Even though UML 2 implemented the parallel frame element, the dynamic nature of the diagrams makes it difficult to depict all the concurrent and parallel interactions that may exist in a complex system. In other words, trying to illustrate many concurrent and parallel interactions in a single diagram would make it extremely large and cluttered. Ultimately, it may require the generation of several additional sequence diagrams. Activity diagrams are better suited for such scenarios as they support parallel flows by using fork and join nodes. Table 2 Strengths and Limitations of UML Sequence Diagrams Note: The table describes the strengths and limitations of UML sequence diagrams. The data is from “Chapter-12 Interaction Modeling with Sequence Diagrams” by Unhelkar (2018). To summarize UML sequence diagrams are a useful tool for illustrating dynamic interactions of objects within a system. In SE, they are usually based on UML class diagrams and they are used in the problem space to model the behavior of systems from the user perspective, in solution space, the diagrams are more detailed and used to illustrate objects' interactions such as the sequence of the message, a parameter list within messages, and the return values of the messages. They help identify missing elements, detail object interactions, and model object deletion. However, the diagrams have limitations such as representing single flows or threads, they do not illustrate or model well parallelism, conditional logic, or loops, and using a single sequence diagram for an entire complex system can lead to confusion and errors. Nonetheless, they are an indispensable and powerful tool in the software engineer's toolkit, they are essential for designing, analyzing, and documenting interactions within a system. References: IBM (2021, March 5). Sequence diagrams. Rational software modeler. IBM Documentation. https://www.ibm.com/docs/en/rsm/7.5.0?topic=uml-sequence-diagrams rmb1905. (2009, March 10). 10.09_Fragments - parallels [Video]. YouTube. https://www.youtube.com/watch?v=mtVVf1mhYKk UML Diagrams Org. (n.d.). UML sequence diagram s. UML Diagrams Org. https://www.uml-diagrams.org/sequence-diagrams.html#execution Unhelkar, B. (2018). Chapter 12 — Interaction modeling with sequence diagrams. Software engineering with UML. CRC Press. ISBN 9781138297432 Visual Paradigm (n.d.). Sequence diagram . Visual Paradigm. https://www.visual-paradigm.com/VPGallery/diagrams/Sequence.html













