Docsity

ASU SER 315 Assignment 3_ Reverse Engineering Task 1 Manual Reverse Engineering (20 point, Exams of Advanced Education

Toggle sidebar
bg1
1
ASU SER 315 Assignment 3_ Reverse Engineering | Task 1: Manual
Reverse Engineering (20 points) | Task 2: Automatic Reverse
Engineering (20 points)
Assignment 3: Reverse Engineering
Version: August 26, 2025
For late submissions please see Syllabus
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.
Prerequisites
1.
The assigned reading on Reverse Engineering
2.
Lecture on Reverse Engineering
3.
Slides and videos about Class diagrams (optional)
4.
Slides and videos about Sequence diagrams (optional)
5.
Astah tool installed
6.
Web-browser or desktop-based Generative AI tool (e.g., ChatGPT)
Tools
•
Install Astah: http://astah.net/student-license-request it is free for students
•
Install the Astah plugin for Reverse Engineering: http://astah.net/features/
code-reverse-plugin. Make sure you check it is installed under "Installed PlugIns".
Submission
Instructions
Please submit a ZIP file containing:
1.
one PDF document on Canvas which includes all your diagrams and answers, name
this document reverse_asurite.pdf (where asurite is your asurite id, example for me
it would be reverse_amehlhas.pdf).
2.
all your Astah files
3.
all your exported folders with your Java code in one zip file
Please submit exactly what is mentioned above. We will deduct points for different file
pf3
pf4
pf5

Partial preview of the text

Download ASU SER 315 Assignment 3_ Reverse Engineering Task 1 Manual Reverse Engineering (20 point and more Exams Advanced Education in PDF only on Docsity!

ASU SER 315 Assignment 3_ Reverse Engineering | Task 1: Manual

Reverse Engineering (20 points) | Task 2: Automatic Reverse

Engineering (20 points)

Assignment 3: Reverse Engineering

Version: August 26, 2025

For late submissions please see Syllabus

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.

Prerequisites

  1. The assigned reading on Reverse Engineering
  2. Lecture on Reverse Engineering
  3. Slides and videos about Class diagrams (optional)
  4. Slides and videos about Sequence diagrams (optional)
  5. Astah tool installed
  6. Web-browser or desktop-based Generative AI tool (e.g., ChatGPT)

Tools

  • Install Astah: http://astah.net/student-license-request it is free for students
  • Install the Astah plugin for Reverse Engineering: http://astah.net/features/ code-reverse-plugin. Make sure you check it is installed under "Installed PlugIns".

Submission Instructions

Please submit a ZIP file containing:

  1. one PDF document on Canvas which includes all your diagrams and answers, name this document reverse_asurite.pdf (where asurite is your asurite id, example for me it would be reverse_amehlhas.pdf).
  2. all your Astah files
  3. all your exported folders with your Java code in one zip file Please submit exactly what is mentioned above. We will deduct points for different file

types.

Task 2.2: Automatic Reverse Engineering (5 points)

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):

  1. All three diagrams have a different level of abstraction. Explain the main differences.
  2. Why do all three diagrams still represent the same system even though they look so different?

Task 2.3: Automatic Reverse Engineering - GenAI - CD (5 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):

  1. Explain the main differences between the manual and AI-generated diagram.
  2. What did you miss in your diagram? What is missing in the AI-generated diagram?

Task 2.4: Automatic Reverse Engineering - GenAI - SD (5 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):

  1. Explain the main differences between the manual and AI-generated diagram.
  2. What did you miss in your diagram? What is missing in the AI-generated diagram? Task 3: Automatic Forward Engineering (10 points) Now export all three of your models (Astah class diagrams) into Java Code (create different folders for each export: Export1, Export2-1, Export2-2). You can do so by clicking Tools
  • > Java - > Export Java. This will get you a dialog for the export. Use this setting for the export: You need to select all classes in the folder to get a correct export. Do not change the code; it will look different than the initial one, and that is intended. Take a look at the different exports and answer the following in your document: (4 points)
  • What are the main differences, and which diagram type would be the best to export to Java right away as a template? Explain your reasons under Task 3 in your document. Tip: For your manually created diagram, check the code to see if it seems correct, e.g., does not contain duplicate attributes. In case it does, try to figure out why and fix it in your diagram (not code; after fixing, export it again into code).