CO7207 Generative Development 2025: Homework (HW1) : UML Modelling and Programming with EMF (Eclipse Modelling Framework)

Published: 19 Feb, 2025
Category Homework Subject Engineering
University University Of Leicester Module Title CO7207 Generative Development

Introduction

In this homework you will develop software models for a system designed to support a business. You will choose the business and the main functionality of the system as part of Task 1 below. This choice is important as the models you will develop in the remaining tasks must match with your choice.

Setup and Important Guidance

A video that explains this coursework in detail is linked on Blackboard. Download the
“gendev.hw1.zip” file available on Blackboard. Import this project into Eclipse (via “File ->
Import… -> Existing Projects into Workspace -> (o) Select archive file -> … -> Finish”). Solve all tasks within this project. After completing all tasks, you can then export this project as a zip file, and upload to Blackboard.

  • The file “scratchpad.xml” should be used in the creation of all diagrams via https://app.diagrams.net (to help, watch this help video on Blackboard)
  • Do not delete any files from “gendev.hw1.zip” – if you do, the best way to fix this is to re-download a fresh copy of the zip and begin again
  • When you have completed all tasks in the “gendev.hw1” project – you should then
    export this as a zip file (via “File -> Export -> General -> Archive File -> To archive file
    -> [enter a name] -> Finish”)
  • The name of your zip must be “A-B-HW1.zip” – where “A” = the student email ID of member 1, and “B” = the student email ID of member 2. For example, if jbh13 and jbh14 are working together, their submitted zip file should be named “jbh13-jbh14- HW1.zip”. If working individually, only A is required.
  • A single zip file must be submitted (you can submit as many times as you like, but only the last attempt will be marked)
  •  Files that do not follow the naming requirement, or that do not compile, will not be marked
  •  The “CheckMySubmission” file can be used to help you check that the submission is correct – but pay attention to what it outputs!

You need to describe the contribution of each member of your pair, and your use of AI tools, in the file “Contribution-and-AI.txt” in the folder “contribution-and-ai” of the “gendev.hw1.zip”. In this file, you need to explain which member worked on which component of the submission and state the percentage of contribution.

Task 1: Description, Invariants and Evaluation 

Choose a business that you will model. Describe this business by listing the stakeholders (e.g customers, staff, etc), the business entities (e.g., your classes), and both the use cases and actions you model later. (100-200 words)

Informally describe the three invariants you will use later (introduced in Part 3). Describe the purpose of the invariant, and both instances (the satisfies and fails instances) for each invariant you will use later (created in Part 4). (100-200 words)

Finally, critically evaluate the use of Generative Development techniques. Do you think using EMF to create the code for your chosen business is successful? More generally, are there ethical considerations you have about the use of generative development techniques? In you answer, link clearly and specifically (e.g. using quotes) to the Padlet we will create in an upcoming session (linked on Blackboard). (100-200 words)

Task 2: Behaviour Model 

You should create your behaviour models as a pair. Submitting work that is like that of another pair, or like an online resource, will be treated as plagiarism (resulting in a score of 0 for HW1). 

Part a) Use Case Diagram

Create a Use Case diagram for the system supporting your chosen business (as described in Task 1 above). [15 marks]
Submission

  • Create the diagram using https://app.diagrams.net and the provided scratchpad.xml (see the help video above).
  • Export the diagram

o    Do NOT compress the diagram – deselect “compressed” under “File ->
Properties”
o    Name this diagram “usecase.drawio” and store this in the folder “task2- Usecase-Diagram”

Marking Criteria

  • Identifying at least 6 meaningful Use Cases (1 mark each) [6 marks]
  • Correct and non-trivial participation of actors in Use Cases (at least one example of more than one actor involved in a Use Case) [4 marks]
  • Correct use of at least one <<extend>> and at least one <<include>> (1 mark for extend, 1 mark for include) [2 marks]
  • Good use of inheritance for Use Cases and for actors [2 marks]
  • No obvious emissions from the use case diagram [1 mark]

Part b) Activity Diagram

Create one activity diagram for the system supporting your chosen business (as described in Task 1 above). [15 marks]

Submission

  • Create the diagram using https://app.diagrams.net and the provided scratchpad.xml (see the help video above).
  •   Export the diagram

o  Do NOT compress the diagram – deselect “compressed” under “File ->
Properties”
o  Name this diagram “activity.drawio” and store this in the folder “task2- Activity-Diagram”

Task 3: Structural Model 

The class diagram you create in EMF should be created as a pair. Submitting any code, or a class diagram, that is like that of another pair or an online resource, will be treated as plagiarism (and result in a score of 0 for HW1).
The following tasks will require the use of Eclipse and the Eclipse Modelling Framework. The previous lab sessions will help you with learning the necessary techniques.

Part a) Class Diagram

Using EMF, design a class diagram for the system of your chosen business. Use role names and multiplicities on all association ends. [20 marks]

Part b) OCL Invariants
Add three meaningful OCL class invariants to the Ecore model that follow your description in Task 1. Do this using the OCLinEcore editor (see here for details). The names of invariants must start with “inv1”, “inv2”, and “inv3” respectively. [10 marks]

Task 4: Instances 

The instances and invariants produced here should be created as a pair and should not match (or be similar) to that of another pair or online resource. Any such case will be treated as plagiarism (and result in a score of 0 for HW1).
You will now continue your use of EMF, this time focusing on instances.

Part a) Instance of Ecore Model (Object Diagram)

Using EMF API (and not the editor plugin), add java code to “src/gendev.hw1/Task4.java” that creates an instance of the Ecore Model (in other words, an Object Diagram). This should have at least 6 objects and 6 links and should be saved into XMI format. [8 marks]

Part b) Instances of OCL Invariants
Using the Dynamic Instance Editor, create two instances per OCL invariant. One instance must satisfy the OCL invariant, while the other must violate the OCL invariant. All instances must be valid in the class Diagram when ignoring the OCL invariants. [12 marks]

CO7207 Generative Development: Writing Homework (HW1) It may seem a bit challenging but that's okay! If the concepts are not clear or you can't find the right solution, you will get step-by-step help from our expert homework helper, who will make your homework easier. With assignment help for UK students, you will get help every step of the way so that you can complete your homework efficiently. If you need reference, Coursework solution examples are also available that will point you in the right direction. Save your time, do good work, and improve your grades—without any stress!

Online Assignment Help in UK