Massey University 159.251

- 首页 >> Python编程

Massey University 159.251 - Software Design and Construction

Assignment 1 - 2023 Deadlines and penalties  You must submit your final work using the stream submission system no later than 10th October 2023 at 11.59pm (China time). The penalty is 10% deducted from the total possible mark for every day delay in submission (one day lateout of 90%, two days late then out of 80% … etc.).  You are expected to manage your source code and other deliverables. “The Cat Ate My Source Code” is not a valid excuse for a late submission.  

Contribution to Final Grade of the Course: 22% Read carefully as there are many parts that you should be aware of.

Overview

You are to work in self-selected pairs (i.e., select your teammate) to create the program defined below, using git to manage source code contribution and integration between the two developers. All project issues and changes should be tracked using an issue tracker (setup within your repository).

Note: Both members of the group will receive the same mark, unless it is clear that the work is predominantly that of a single person. These will be sorted out on a case-by-case basis. The partition of the work is entirely up to you and your project partner. Part of this assignment is to become familiar with using git for version control. You will need to use GitHub for this assignment, and the repository must be private.

IMPORTANT: use the following conventional name for your repository: 251-Assignment1-2022-FirstName1-FirstName2. For example, if the first student is Sarah and second student is Li, then the repository name should be (251-Assignment1-2022-Sarah-Li).  

Please send invitations to join your Github repository to the following GitHub user ID:

mimt087. If you face issues accessing GitHub with/without VPN then you can use Gitee. Here is my id: mimt_0c5b. If your group decides to use Gitee, do email me with the member names and let me know. This is important and will be part of your assessment.

Tools Required

● IDE independent: you may develop this in any IDE or code editor you like! Tools included here are available for major IDEs, and also as Maven dependencies. Any Java IDE (Eclipse or IntelliJ or any other of your choice) would work. ● Git (for version control) ● Issue Tracker (for log changes and bugs) ● Maven (for dependency management and process automation) ● A metrics tool such as Eclipse Metrics Plugin, MetricsReloaded, CodeMR, (or any other alternative) ● PMD Maven plugin (for code quality check) ● Other libraries to perform the different functionalities (you are free to search and use any library that will help in implementing your functionality.

Tasks

1) Developing a text editorprogram using Java – see details below.

2) Source code and version control:

a) create and maintain a git repository on your local machine for your source code, and on a remote repository to provide a central server accessible to both members, and also accessible for marking.

b) keep an audit trail of commits in the git repository. These will inform part of the marking. c) Make sure that you actively (on an almost daily basis) use git features of

branching and merging (not only on the last day before submission!).

d) write your configuration files using YAML format. You must submit at least one configuration file that works with the text editor. This could be a file with the default parameters for the text editor such as the default text format or default font colour.

3) Log changes and bugs: Keep track of changes and issues – use anissue tracker as part of your version control. Please use the same issue tracker that is provided by your git project hosting site (e.g., the “issues” feature in github). This has to be actively used!

4) Automation: automate your process, so it is easier to load files and generate reports. Use Maven to declare all dependencies. If you are using any external libraries, do not include any jar files with your submission but add them as maven dependencies! Also, don’t try to change your Maven files into a different format. The pom file should be an XML file.  3

Build those Maven build tasks in your Continuous Integration (CI) pipeline. On GitHub, you could use GitHub Actions (built-in in GitHub) or Travis CI (external tool). Make sure that configuration (YAML) file is correctly added.

5) Readability: make sure you write clean code, exceptions are correctly handled, and added comments to explain your code. Make your code “human-readable!”.

6) Quality: check the quality of your code and outputs a) Use code quality checking tools to report metrics data of your program. The metrics report generated from your code should be submitted. The process should be automated and included in your maven dependencies (see Section 2 below). b) (Bonus) Write unit tests using JUnit to test (at least!) the following functionalities: open, save and search (see details below).

Make your own text editor!

1.The Text Editor

Your program is basically a standard text editor (or text processor) – something similar to Notepad, Atom (basic setup) or Geany. The editor should allow you to write text on it using standard text encoding formats (i.e., ASCII/UTF-8). You should develop this program in Java. Note: a standard text file (mostly) does not need any additional metadata files to assist the reader in interpretation, The main functionalities of the text editor are:

- Full GUI access to the application

- Create a menu of options at the top of the editor, similar to the following  The menu should (at least) include the following sub-menus: File, Search, View, and Help

- Implement the following functionalities:

oNew function: to create a new (fresh) window.

oOpen function: to read other text files (just standard .txt files). This should allow users to navigate the file system to select\search for a file.

o The ability to read OpenDocument Text (.odt) files. This is part of the Open function.

oSave function: save text output into .txt file format. This should allow users to navigate the file system to save the file in a selected drive/location.

oSearch: search for text within the screen (this will be tested based on a single word)

oExit: to quit the program – close all windows.

oSelect text, Copy, Paste and Cut (SCPC) capabilities.

oTime and Date (T&D): retrieve the current time and data from the OS and place it at the top of the page of the editor.

4

oAbout: display the names of both team members and a brief message in a popup message box.

oPrint function: allow your editor to print text by connecting it to the local printer in your machine (similar to any other text editor that you have used).

Harder functions

o Ability to read source code files such as .java, .py, .cpp or similar. different syntax should be shown in different colours. For example

o Reading and displaying other file formats beyond txt and source code files: mainly, Rich Text Format (RTF) and OpenDocument Text (ODT) format. Hint: you can use an external library to do so.

o include a PDF conversion function in your editor, so the file can be saved in PDF format (for standard text files). Use an external library for this, such as

Apache PDFBox.

Note : There is no specific requirement regarding which GUI library you should use. But try to make your program as cool as possible! There will be an extra mark for interesting ideas that have been implemented, but those should be reported and explained in the

Readme.md file that should be submitted with the assignment.

2.Code Quality and Management

Once development is done, you need to report metrics data using a metrics tool. You may use a software metrics tool (see some examples above). Code quality report from PMD should also be submitted with your assignment.

a) generate a metrics data report from any software metrics tool (see below for the specific metrics) and add the report file (.txt or html) to $project$/reports/metrics b) create a new maven goal called “pmd” that should generate a metrics report using

PMD (see below for the specific metrics)and add the report files to $project$/reports/pmd.

● Code Size (per class): Lines of Code (LOC) and Number of Methods (NOM) ● Code Complexity: Cyclomatic Complexity and code coupling metrics (Coupling Between Objects (CBO) OR Efferent Coupling).

5

● Code Quality Report from PMD. Use only Java Basic rules such as Naming Convention for classes and variables (extract the full report and include it with your submission).

Submitting your assignment

1. All submission is to be done using Stream 2. Additionally, share your program on your private GitHub repository with us by sending a share invitation to the GitHub user mimt087. This is to track commits on your git repository.

Include a Readme.md file in the top level of the project

The Readme.md is a text file with a Markdown syntax (this should be correctly formatted as a markdown syntax) that contains: 1. the names & IDs of BOTH MEMBERS of the group- very important for getting marks** 2. clear instructions on how to run your program, and if there are any other folders, what they contain.

3. for each student, a couple of the most significant git commit IDs that show the work of each individual member of the group.

4. any other interesting features you feel are worth mentioning and that you think should be recognized in marking.

Who submits what?

Only one member of a group should submit a complete project, the other just submits the Readme.md file:

●member A: submit (through Stream) a single compressed (e.g., zip or tar) file that contains the assignment (source file plus any executables)

oname the compressed file with both members’ FirstName_LastName and ID numbers (e.g. Xiaofeng_Liu-87878787-

Susan_Jones-01002023.zip)

●member B : submit just the README.md file containing your name and that of the partner who is submitting the zip/tar file. This is so Stream knows that you've submitted something.

Read more about .md files at →https://www.markdownguide.org/ Markdown Quick guide →https://github.com/adam-p/markdownhere/wiki/Markdown-Cheatsheet

Assessment

Your assessment will be based on the following criteria:

Criteria Mark

Correct implementation of the text editor main window (which should also include a main menu) 2 Correct implementation of the following functions: New, Open, Exit, T&D and About 1.5 Correct implementation of the Select text, Copy, Paste and Cut (SCPC)

functions, 1 Correct implementation of the following functions: Save, Search and Print. 1.5 Advanced: PDF conversion function 1.5 Advanced: correct implementation of the following functions: Open (read) .RTF and .ODT files

2 Correct implementations of the following functions: read source code files

such as .java, .py, .cpp or similar. Different syntax should be shown in

different colours.

2 Appropriate use of git FROM THE START OF DEVELOPMENT 3 Appropriate use of issue tracking to track changes/issues FROM THE START OF DEVELOPMENT.

2 Correct use of maven with all external dependencies correctly added 1.5 Correct use of configuration files (in YAML)

Correct use and implementation of the CI using GitHub Actions or Travis CI 1 Check code quality and include reports of the size, complexity and other quality metrics. PMD is also added as a maven goal 1 Overall code quality, including exception handling and comments to explain the code. 1

Total22 (max) (extra/bonus) High quality unit test added 1

Note: The maximum marks achievable is 22. The extra/bonus 1 mark will be used to make up for any lost mark. Therefore, if someone has met all the requirements including those for the bonus marks, they can not score more than 22.


站长地图