



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Objective: This assignment focuses on the practical application of reverse and forward engineering. You will manually create UML class and sequence diagrams from Java code, then generate them automatically using both a dedicated tool and Generative AI. One of the main objective is to compare the diagrams produced by these different methods. Finally, you will perform forward engineering by exporting your diagrams back into Java code to understand how design models translate into programming templates. The code is not necessarily good code, we might revisit it later to improve it. As an add on task (not points nothing to submit) you might want to think about all the bad things in this code.
Please submit a ZIP file containing:
types.
Create a new Astah project (a new Astah file). Create an empty class diagram. Now go to Tools - > Java - > Import Java and browse to your src folder for the project. Select all the Java files and click OK. Now, it should ask you if you want to import the attributes as associations. Select all and let Astah import your classes. You should now see the classes show up in the package structure on the left-hand side of Astah. Now, drag all your classes from this structure into your empty class diagram. You should get another class diagram, which probably looks a bit chaotic. Rearrange it so we can see all associations. Export this new class diagram into your document under Section Task 2.2. Advice: Look at your diagram again and check if you have done it correctly, chosen the correct multiplicities, etc. Consider whether you should be closer to the first or second automatic export. Explain in your document (2 points):
Upload or copy the provided code (skip the Main class) to a Generative AI tool. Note: If you are uploading, there may be a limit of 10 files. Ask the generative AI to generate mermaid code for a class diagram. You may need to experiment with your prompts to adhere to the instructions provided for Task 1.1. To visualize the mermaid code, copy the generated code to the https://mermaid.live/ webpage. Once you are happy with the result, then, on the lower left side of the page, find the “Actions” menu and copy or download the generated diagram: Export the generated diagram AND the screenshot of your prompt(s) and the AI response (mermaid code) into your document under Task 2.3. Explain in your document (2 points):
Upload the addObservation() method from the Main method or the whole file into a Generative AI tool. Ask the AI to generate the mermaid code for a sequence diagram for the addObservation() method. The sequence diagram should be in a high level of abstraction basially like you did manually. Copy the generated code to the https://mermaid.live/ webpage to visualize it. Try ad- justing your prompts to the AI until you are happy with the result.
Export the generated diagram AND the screenshot of your prompt and the AI response (mermaid code) into your document under Task 2.4. Explain in your document (2 points):