Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
Inf2-SEPP 2024-25
Coursework 3
Software implementation of
Creating a software design
for an extended university self-service portal
This coursework requires teamwork for SE ( 1), and individual work for ProP ( 2).
1 Your SE work (team work)
The following are the documents that you will primarily need:
- Development Tools document
- CW3 Requirements and Design Document
- CW3 starter code
- CW3-SE high level marking scheme
- CW3-ProP high level marking scheme
- The document that you are reading right now
Please never refer to your CW1 or CW2 solutions in this coursework.
1.1 Requirements and their updates
Moreover, your company has recently received clarifications on some of the stakeholders’ needs, and so it has come up with the following decisions, which you should also consider:
Removing FAQ Question-answer Pairs. Whenever an FAQ question-answer pair is removed by admin staff, if it was the last item in its topic (i.e. there were neither any other question-answer pairs or other subtopics at the same level of the hierarchy), thesystem should automatically remove the (now empty) topic that it belonged to. There are no other ways to remove topics from the system.
Editing a course. For simplicity, admin staff will not have the functionality to edit a course on the system. (Note that since this use case is not in the list from 1.6.1, you do not have to implement it anyway).
Logging. The changed requirements from CW2 included the addition of a logger that would track and save the outcome of any action done by a user. To achieve this, your team has decided not to go with your original design, but use the tinylog library 1 . You need to use this library in your implementation rather than the solution provided in the design diagrams in the Requirements and Design document, while still keeping to the requirements from the same document about what the logs would include.
1.2 Design documents
In addition, your company still has access to the old system’s code. A colleague has removed from it the old functionality related to university pages which is no longerneeded. This modified version of the old code has been given to you as starter code(see 1). IMPORTANT! You are required to start implementation from thisstarter code in your solutions.
1.3 Using tools, agile approaches and practices
• You are encouraged to try out software tools that are recommended for your chosen approaches and practices, but also experiment with other tools that may be helpful for construction, testing and teamwork. Overall, apart from the required toolsmentioned in the next section, you could try out for example GitHub and the Git version control system 2 , a test coverage tool like the default one provided by IntelliJ IDEA3 or one of its alternatives, a bug tracking tool like Trac4 or JIRA5 , a static analysis tool like SpotBugs6 or Infer7 , any tools for support with agile like JIRA, and any tools for team work as presented in the teamwork resources.
It is up to you how many and which tools, agile approaches and agile practices you use, and it should be based on your judgement of what could be beneficial for developing thissystem. Some of these may prove to be real life savers! The effort you put in will alsoinfluence the quality of the reflection which you make in Task 6 and your assessment for that section.
1.4 Required Development Tools and Setting Up
You will also need to know how to create and run tests using JUnit (version 5). The first thing is to set up your IDE with JUnit. If you go with our recommendation to use InelliJIDEA, here is a tutorial (go wih Maven option): https://www.jetbrains.com/help/
Note that the mock authentication service uses a JSON library “json-simple”(com.googlecode.json-simple v1.1.1). Add this library to your pom.xml, using asimilar procedure like in the JUnit tutorial: https://www.jetbrains.com/help/idea/junit.html.
1.5 Following good practice in construction and testing
A common recommendation is that you never use tab characters of the default size set upby your IDE for indentation and you restrict line lengths to 80 or 100 characters. You arestrongly recommended to adopt both of these recommendations because it is good practice and, particularly, in order to ensure maximum legibility of your code to the markers. Agood practice is to adopt a consistent formatting style either via your IDE or a standalonetool (which can be used via an IDE) such as http://astyle.sourceforge.net/
Be sure you are familiar with common interfaces in the Java collections frameworksuch as List, Set, Map, and Queue/Deque and common implementations of these suchas ArrayList, LinkedList, HashSet, TreeMap. Effective use of appropriate collection classes will help keep your implementation compact, straightforward and easy to main tain.
Browse the guidance at https://www.oracle.com/technetwork/java/javase/tech/ index-137868.html on how to write Javadoc comments. Follow the guidance on including a summary sentence at the start of each comment separated by a blank line from the rest of the comment. This summary is used alone in parts of the documentationgenerated by Javadoc tools.
Sometimes it is seen as important to have development teams and testing teams distinct.This way there are two independent sets of eyes interpreting the requirements, andproblems found during testing can highlight ambiguities in the requirements that needto be resolved. As you work through adding features to your design, you could alternatewho writes the tests and who does the coding.
Use JUnit 5 to your advantage by using the right methods in your test class, the rightannotations to test methods, and the right assertion methods (see Lecture 19).
Your system test files will serve as your primary evidence and documentation for thecorrect functioning of your system. In terms of their documentation, take care with howyou structure your test methods, give them intuitive names, add appropriate comments (for example noting particular features being checked) and include a clear message when each test fails.
1.6 Your Tasks
Bear in mind that it is not enough to submit code claiming to implement your systemwithout testing and other documentation demonstrating its effectiveness. As part ofthis assignment you are asked to implement tests demonstrating the correctness of someclasses, and how your system implements the key use cases of the system, and thesetests will be used as the primary means of marking this coursework.
1.6.1 Task 1: Code construction
1. Add FAQ Q-A [modified]2. Add course3. View courses4. Add course to timetable5. Choose tutorial or lab for course6. Consult FAQ [modified]7. View timetable (only for teams of 3+)8. Remove course (only for teams of 3+)9. Consult member of staff [modified] (only for teams of 4)10. Remove FAQ Q-A pair (only for teams of 4)
Some of the above use cases require modifications to the starter code, others require completely new functionality. We expect you to reuse as much of the starter code aspossible, and not to modify its underlying structure. However, if you have strong reasonsto do otherwise, you should justify your choices (also with regards to the design diagrams,see below) in the text.
Make sure you closely follow the relevant parts of the class model and the sequence diagrams (see 1). Your code should mostly match the provided class and sequence diagrams.
Make sure to add comments (both JavaDoc and inline) to your methods. You shouldmake sure to explain what the various parts of your code are doing, such that a colleague(or a marker) can understand it easily.
Include inline assertions in at least some of your methods (minimum two) as a means ofcatching faults and invalid states, but please make sure that you turn these off beforesubmitting.
Advice for writing high quality code was provided in section 1.5.
Unlike CW1 and CW2, this coursework doesn’t have a dedicated ”ambiguities and assumptions” task. However, you should still make sure to mention any assumptions you make in this task.
Reaching an ”Excellent” mark in this task
If you become confident that your solution to this task correctly respects all of its instructions from above and is of high quality, and you want to be able to reach a markof ”Excellent”, you need to put in effort to go beyond what was required to impress themarker. The following are some possible ways:
- Putting a lot of effort into checking for faults, invalid states, or doing input validation to the code; Briefly mention what you have done in the report.
- Frequently using well-known and high quality algorithms; Include their mentionand a justification for using each in the report.
- Looking for ”bad smells” in the code and proposing ways that the code could berefactored (in writing only, without modifying the code which will be checked forconformance with the class and sequence diagrams). Here, please include smallcode excerpts in the report as needed to support the explanation. See Lecture 17.
This, together with excellent tests, can lead to exceptionality marks too.
1.6.2 Task 2: Unit testing
1. Groups of 2: MockAuthenticationService2. Groups of 3 or 4: MockAuthenticationService, MockEmailService
These should focus on checking whether the implementation of each specific class is correct, and all pass. Place the tests for a class named MyClass in a file named TestMyClass.java, and use JUnit 5 assertions and annotations similarly to the examples provided in lectures and Tutorial 6.
In each test class, you should have several test methods for each method of the class that you are testing. Each test method should test for one combination of inputs as parameters. Make sure that you include frequent classes of inputs, but also more unusual ones, boundary and incorrect inputs for testing (see Tutorial 6 and its solutions for help). Each test method should be appropriately named such that the case you are testing is clear. Each test method should run the method that is being tested only once, i.e. you would normally have one single assert statement in each test method. Finally, include a clear message when the test fails.
Other advice advice for testing was provided in section 1.5.
If you become confident that your solution to this task correctly respects all of itsinstructions from above and is of high quality, and you want to be able to reach a mark of ”Excellent”, you can try to test for all classes of inputs for each method and also use a tool to calculate statement and branch coverage in each of the tested classes and improve your code and retest until they are at least 70% (see Lecture 18). This, together with excellent code and system tests, can lead to exceptionality marks too.
1.6.3 Task 3: Code review
Please join one of the Week 10 or 11 labs as a team, having prepared in advance theimplementation for the method. There, one of the lab demonstrators will first ensure thatyou have the necessary code (precondition for the code review). Then, the demonstratorwill pair you up with another team and you will be asked to exchange your implementationwith them (and only them), and work separately to assess each other’s work and writeyour notes in a text file, for 20 minutes. At the end of your allocated time, you will beasked to exchange your notes with the other team, and also submit them in an area on Learn which will be dedicated to the code review, all under the supervision of the demonstrator.
1.6.4 Task 4: System testing
To get a good mark for this coursework you must test all the use cases you implemented, with several scenarios each, and make sure that they all pass, since your tests will provide the main means for assessing your implementation. Even if you have implemented a feature, you may not get full marks if you have not tested your system sufficiently to demonstrate your system successfully implements the feature.
Few tests are able to test single use cases by themselves. In nearly all cases, several use cases are needed to set up some state, followed by one or more to observe the state. For example, you will need an admin member of staff to log in and add a course to the system before they log out and a student can log in, add the course to their timetable and choose a tutorial or lab for it.
Do not run all your tests together in one large single test. Where possible, check distinct features in distinct tests. However, don’t rely on the order of the tests and Java does not necessarily run them in that order.
To simulate user input for system testing, you can add Mockito (https://github.com/ mockito/mockito) to your project (in a similar way to how you added JUnit and the JSON library- see Section 1.4), or google ”Java JUnit simulate user keyboard input” or similar to explore other alternatives.
Include all your system tests for each use case as JUnit test methods in a [use-case-name] SystemTests.java class (e.g. AddFAQQASystemTests.java, AddCourseSystemTests.java etc.). Overall, you should have one such class for each use case.
Other advice for testing was provided in section 1.5.
If you become confident that your solution to this task correctly respects all of its instructions from above and is of high quality, and you want to be able to reach a mark of ”Excellent”, you can try to cover through your system tests most if not all of the different scenarios for each case that you are tackling. This, together with excellent code and unit tests, can lead to exceptionality marks too.
1.6.5 Task 5: Quality attributes
This section asks you to reflect and self-assess your team’s progress with this course work. We think such reflection could have an impact on your learning and of yourunderstanding/expectations of how you will be marked.
Important! You should make a real effort to be reflective, as well as honest, in thistask. Please note that only making bold statements like “We did this excellently well”,with no justification, and (even worse!) not being open to consider that there is always room for improvement, will result in very little, or even no, credit for this part.
Start by having a look at the following reflection model (adapted from the Integrated Reflective Cycle (Bassot, 2013)) that you are asked to use to structure your reflection:
You can see an example of this model being put to use at this link.
Using the above reflection model, write one- two paragraphs summing up to maximum 250 words of reflection on your team’s teamwork for this coursework. Focus on things such as how you got organised, split up responsibilities between team members, communicated, and managed progress in working towards the deadline for this coursework. Make sure to mention and reflect on the use of and usefulness of any tools that you tried out in this process, e.g. physical or online tools for managing your team work. You can use the reflection model repeatedly to describe how you improved your teamwork over time.
Using the same reflection model, write one or two paragraphs summing up to maximum 250 words of reflection on the quality of your work. Mention how well you think you tackled the work in the different tasks. We recommend you have a look at the marking scheme from this link - making specific reference to parts of it- to help you structure this response, however touching on all marking criteria or marking yourself using it is not expected. You can use the reflection model repeatedly to describe how you improved your solutions over time.
Using the same reflection model, write one or two paragraphs summing up to maximum 350 words of reflection on your use of tools, agile approaches and practices for this course work (see 1.3). In particular, here it is useful to reflect on your reasoning for choosing each approach/tool/practice (and not choosing an alternative), how the approach/tool/practice worked for you, what you would conclude are its advantages/disadvantages, what you would do differently next time you develop a system. IMPORTANT! In your de scription, please include some screenshots of your use of any tools that you mention.
You are also required to declare the amount of work8 that was carried out by each of your team members, so that we can adjust your individual mark accordingly. In particular, you are each expected to split up work fairly. This means each team member doing:
- Teams of 2: around half (50%) of the work
- Teams of 3: around a third (33%) of the work
- Teams of 4: around a quarter (25%) of the work on this assignment (no matter how you split responsibilities).
For this task, prepare the following:
a) If you consider your work was split fairly according to the definition from above, include in it the text ”The work was split fairly between our team members”. Then, each team member signs, but only if they agree with the percentage next to their name (see Terms below).
b) If not, write for each team member an estimate (in percentages) of how much work they have carried out. Then, each team member signs, but only if they agree with the percentage next to their name (see Terms below).
Terms: Failure to submit the Team Work Declaration document (even in the presence of submitted Individual Work Declaration Forms), or submitting it after the deadline + 30 minutes, will lead to our assumption that you have split the work fairly, and you will all receive the same mark without any objections possible. We will accept a Team Work Declaration document without all signatures included, as long as it is submitted before the deadline + 30 minutes. However, note that submitting it without all signatures will lead to a potentially difficult conversation between the course organiser and the team members. In the absence of any submitted Individual Work Declaration Forms, a fully signed Team Work Declaration document option a) will result in the same mark for all the team members, while option b) will mean bringing the mark down for anybody with a lower percentage than expected, in accordance with the declared percentage (e.g. if a team member in a 4-person team did 15% of the work, this is 60% of the 25% they needed to do, so they will receive 60% of the team’s mark). Individuals who have done more than their share will not have their mark increased according to the percentage, but may respect criteria for excellence and exceptionality for a very high mark (see the marking scheme here), and be considered for a small bonus (at the course organiser’s discretion) after all courseworks. When Individual Work Declaration Forms are also submitted within the deadline + 30 minutes, they will also be used to decide on the individual marks, with the same considerations for students putting in more than their share of the work as above.
2 Your ProP Work (ATTENTION! individual)
This essay-task is not to test your factual knowledge derived by lectures or reading, yet the understanding and ability to reflect on information presented and apply this to your own context in a coherent manner.
There are no “right” answers–the main goal is to see your thoughts and reasoning based on evidence.
Topic 1. In class, we have discussed three types of organisational models: bureaucratic, organic, and matrix. Argue which one of the three would be best suited for Acme Corp and why. Why are the other two not suitable?
Topic 3. Identify one or more SE standards that are applicable to your new “Self-service portal” system and propose an approach to address the standard(s). What would be an alternative approach? Why is yours better suited?
When writing the essay, you should think about the assessment criteria for this coursework– available on Learn as a marking scheme. Read carefully the criteria definitions and use them to guide your writing.
1. Revisit relevant (course) materials. Revisit lectures 1, 3, 8 and 16, and other useful sources (e.g., the first chapter of “A rulebook for arguments”). Carefully read the coursework description.
2. Brainstorm. Take some time to write down your premises, conclusion, potential evidence. Write down ideas that support your conclusion but also opposing views. Think about various perspectives and write down ideas. Do not worry about your writing style or structure/organisation of ideas, just write ideas down, preferably using bullet points.
4. Draft. Write a rough draft of your essay. Don’t spend time checking how correct your sentences are. Just write and try to include any data/direct quotes as early as possible.
2.3 Assessment for the ProP Tasks
3 Some advice (same as for CW1 and CW2)
To get organised and work effectively as a team, carry out the teamwork acivities in labs, have a look at the Teamwork Resources from here, and follow any advice on teamwork from guest lectures. You may want to mention what you have done and used for teamwork in Task 7. If you need advice on teamwork, or you have experienced difficulties with it which you have attempted to address for the past 7 days with no/little success, please ask for help on Piazza (tag with teamwork) or email your course organiser. She will discuss the matter privately with you and/or your peers, as appropriate.
Please ask questions in labs or on Piazza if you are unclear about any aspect of the system description or tasks. On Piazza, tag your questions using the cw3 folder for this coursework. As questions and answers build up on the forum, remember to check the existing questions first: maybe your question has already been answered!
In case of questions regarding the organisation of teamwork in this course, please consult the Teamwork FAQ from here. Use Piazza (tag with teamwork) or email your course organiser in case your question was not covered there.
Please remember the University requirement as regards all assessed work: http://web.inf.ed.ac.uk/infweb/admin/policies/academic-misconduct
You are also required to take reasonable measures to protect your assessed work from unauthorised access. E.g., if you put any such work on an online repository like GitHub then you must set access permissions to allow access only to you and your team.
4 Submission
2. The SE team declaration of work, under“Assessment” - “Coursework 3”- “Software Engineering Tasks”- “Submit (Team) Declaration of Work (CW3)”. This should include A PDF (not a Word or OpenOffice document) of your ’Team Declaration of Work’ document, entitled DeclarationTeamX.pdf, where you replace the X with your team number. This document will only be accessed by your course organiser. This submission should also only be made by one of the team members, but this team member can be different to the one who submitted the requirements document.
Please DO NOT include your name, or the declaration of work within this document, so that we can mark anonymously.
How to Submit
If you do have a problem submitting your assignment try these troubleshooting steps:
Note the course name, type of computer, browser and connection you are using, and where possible take a screenshot of any error message you have.
5 Deadline
This coursework is worth 63% of the total coursework mark: 38% for the SE tasks, and 25% for the ProP tasks. We estimate it should take each team mem ber around 26 hours of work (20 for SE tasks, 6 for ProP task).Extension rule 2 from here is used for this coursework- see details for group submissions.