安徽热线 科技正文

代写program、代做Python,Java程序设计

2024/04/25 07:06:59   来源:互联网


OOP Coursework
This coursework covers the first half of the course and while it has a final deadline at the end of the first
half of the semester, you will need to make regular commits on gitlab to achieve full marks. Below, we
will provide you with an overall idea of the course work and specific tasks for you to finish each week.
Set-up Instructions
Please, visit https://gitlab-student.macs.hw.ac.uk/f27sb_2023-24/f27sb_2023-
24_coursework/oop_coursework and create your own fork of this project. Once the fork has been
created, import the starter code into Eclipse. Should you struggle with any of this, please have a look at
the “How to videos” on the course page on Canvas. If you should still face any problems, please talk to a
lab helper during your lab slot.
The Coursework
For this coursework, you will need to implement a task management system with a simple text-based
user interface. The system should support several different types of tasks and should allow the user to
add new ones and remove existing ones. Please, pay close attention to the rubric at the end of the
document.
The implementation of this system needs to follow the OOP principles that we discuss in the lectures,
and it should include comments that clarify how your code addresses principles such as cohesion and
coupling. Each week, you will be asked to complete a different part of the system and it is important
that you do so because this will guide you to the most desirable solution for this coursework. Moreover,
if your git commit history does not show incremental development of the final solution, you will
receive 0 marks for this coursework.
Weekly tasks:
Week 1-2 – suggested deadline: end of week 2
• Implement a Task class which contains an ID, a name, and a description of the task. The
ID and name are mandatory fields of the Task meaning that each instance of Task should make
sure that these are specified. The description is optional and can be omitted by the user. Create
as many constructors for this class as required. Finally, implement a way to generate a textual
representation of this class. Make sure to include a comment which states java.utils.comment in every file you create.
• Implement a TaskManager class which uses a collection to store all the instances of Task that
the user creates. This class should contain the following methods:
o addTask which adds a new task to the current list of tasks. No two tasks with the same
ID should be allowed to be added to the collection of tasks. If a new task with an already
existing ID is given as a parameter, this method should return a value that shows that
this operation has been unsuccessful and ignore the new task.
o removeTask which uses the ID of a task to find it in the list and remove it. Make sure
to return success or failure of this operation because this should only work if a task with
the given ID exists in the list of current tasks.
o getSize which returns the current number of tasks in the list.
o a way to get a textual representation of all the tasks in the list.
• Implement a text-based user interface. This should display a welcome message and instructions
on how to use the system. Use a Scanner object to get the input from the user. The user
operations you need to implement are:
o Show all current tasks
o Add a new task
o Remove an existing task
o Exit the program
• You can find a good example of how to use a Scanner for user input here:
https://www.w3schools.com/java/java_user_input.asp
• All implemented classes need to ensure high cohesion and low coupling. Make sure to comment
on how you achieved this in the code.
Week 3 – suggested deadline: end of week 3
• Implement a unit test for your TaskManager class. This should test the addTask and
removeTask methods. Make sure to cover all possible options of success and failure in your
tests and use positive and negative tests. Make sure to include a comment which states java.utils.comment in every file you create.
Week 4 – suggested deadline: end of week 4
• Change the TaskManager class to be a subclass of the collection you are using to store the
Tasks in. For example, if you have been using an ArrayList in your TaskManager to store
the Tasks in, you should now make sure that your TaskManager extends ArrayList.
Subsequently, change your implementation of TaskManager to not use an ArrayList
anymore but now be the ArrayList. Make sure that all your tests still pass.
• Implement a hierarchy of tasks: Make sure to include a comment which states java.utils.comment in every file you create.
o PersonalTask which should be a subclass of Task
o WorkTask which should be a subclass of Task
o TeamWorkTask which should be a subclass of WorkTask. This task should have an
additional field for the teamName. Make sure to create all the required constructors.
• Each of the new tasks should contain a method that generates a textual representation of it
which states the type of task (i.e. personal, work, or teamwork) as well as the information
provided (i.e. ID, name, description, and teamName).
• Adjust the user interface to allow the user to create all different types of tasks.
• Adjust your JUnit test to test all different types of tasks.
Week 5 – final deadline: beginning of week 7 (check on Canvas)
• Make the Task class abstract. Make sure to remove the option to create a Task from the user
interface. Only Personal, Work, and TeamWork tasks should now be created.
• Implement a Remindable interface which contains a remindUser method.
• Add the Remindable interface to the WorkTask and TeamWorkTask and implement a
simple remindUser method that prints a reminder message.
• Implement a way to store all the current tasks on the hard disk when the program exits.
• Implement a way to read a file with tasks from the hard disk when the program is started.
o After the file has been read, print a list of all the current tasks and print all the reminder
messages from all the tasks that implement the Remindable interface.
• Add a JUnit test to make sure that your File I/O operations work correctly.
Submission guidelines
GitLab submissions
You will need to make regular commits to GitLab! You do not have to commit something every week but
there has to be a commit for each weekly task. Hence, you need to make a total of 5 commits for this
project. Each commit needs to show incremental progress towards the final goal and needs to include a
commit message that states what you have achieved since the last commit. There needs to be enough
time between each commit to sensibly be able to do all the required work. If you make 5 commits within
a single day to finish the whole program, it is very unlikely that you have done the work yourself and we
will have to have a discussion with you. If you do not make incremental commits to GitLab, you will
receive 0 marks for this assignment.
Canvas submission
Download your final GitLab project as a zip file and commit it to Canvas before the deadline. This
ensures we have a backup of your code and tells us if the submission was on time. We will only use the
submission time on Canvas to determine if your submission is on time. Hence, make sure to finish your
project early enough so you have time for the final submission.
Plagiarism
This is individual coursework. That means you can discuss the coursework with your peers, but not share
your work or use anybody else's, passing it off as your own. You can find more on the general academic
misconduct rules here: https://www.hw.ac.uk/uk/services/academic-registry/academicintegrity/academic-misconduct.htm.
You are required to do all the work yourself. It is very easy nowadays to just ask an AI to do the work for
you and while that might help you finish the coursework; it will not teach you anything. You are here to
learn and not just to bide your time until you get a degree. This assignment is meant to prepare you for
the remainder of your studies which will require you to know how to program. Getting enough
experience programming is, therefore, more important than anything else in 1st year and the only way

请加QQ:99515681  邮箱:99515681@qq.com   WX:codinghelp

责任编辑:code

相关阅读

Copyright © 安徽热线 All Rights Reserved.