This coursework is for the CPT206 module, accounting for 70% of the final mark. It consists of a coding part and a report, with a submission deadline of Sunday 18 May, 2025, at 23:59 (China-time).
The goal is to create a budget planning and management system in a single Java NetBeans project. It should have a proper class structure and various functionalities, with all classes encapsulated. There must be a main class to run the application.
- Base Class: The
Transaction
class represents a transaction. It has two subclasses,Expense
andIncome
. - Unique Identifier: Each transaction gets a unique ID using
java.util.UUID
. - Sorting: Transactions are sorted by their date and time. Assume no two transactions occur at the exact same time.
- Effective Amount: The
Transaction
class has agetEffectiveAmount()
method. InIncome
sub - class, the effective amount is the same as the transaction amount. In theExpense
subclass, different payment methods (cash, card, Alipay, WeChat) have different fees (0%, 1%, 0.5% respectively), which are factored into the effective amount.
- Category Management: Manages expenses for a specific category like food or electricity bills.
- Attributes: Each category has a name, a fixed monthly limit, and a current expenditure (initially 0).
- Methods: There are methods to add expenses, check if the current expenditure exceeds the monthly limit, and reset the current expenditure to zero.
- Budget Management: Responsible for managing an entity's budget. It stores all expenses and income.
- Data Storage: Choose an appropriate Java collection to store expenses and income, and document your choice in the code.
- Transaction Handling: Can add transactions. Adding an expense requires specifying the budget category. If adding an expense exceeds the category's monthly limit, throw a
MonthlyLimitExceededException
(which you need to create). - Category Operations: Can add new budget categories (with no initial expenses) and delete existing ones.
- Filtering: Can filter expenses and income, such as getting all expenses in a specified category, all expenses exceeding a certain amount, and all transactions in a specific time period. Filtered transactions should be sorted by date and time.
- Command - Line Interface: Add a text - based command - line user interface. Use XipuAI to learn how to code it.
- Functionality: The interface should support budget management based on the
BudgetManager
class. You can add extra features like calculating net earnings. - Best Practices: Follow best practices for command - line interfaces, including exception handling and input validation. The interface should be user - friendly and easy to navigate.
- Code Standards: Keep the code neat, with proper indentation. Use suitable variable and method names following Java naming conventions.
- Comments: Add comments as needed and split code into appropriate methods. Write Javadoc comments for the
BudgetManager
class API and submit the generatedBudgetManager.html
file.
Write a report in a Word document and submit as a PDF. Refer to lecture slides or lab worksheets where appropriate.
- Explanation: Explain which OOP features (like encapsulation) and principles (like the single - responsibility principle) you incorporated in your design. Define the features/principles and illustrate with code snippets if necessary. The section should be 1.5 - 2 pages long.
- Testing Approach: Describe how you tested different parts of the program. You can use JUnit (if familiar) or manually test in the main class.
- Functionality Tested: State what functionalities you tested and how, considering corner cases. You can include sample code. This section should be 1.5 - 2 pages long (excluding screenshots/code).
- User Interface Explanation: Explain how the user interface works, including its functionalities, navigation, exception handling, and input tolerance mechanisms.
- XipuAI Usage: Detail how XipuAI helped you create the interface. The marking is 4 marks for the interface explanation and 4 marks for XipuAI usage. Attach the conversation transcript with XipuAI in an appendix. This section should be no more than 2 pages long (excluding screenshots).
Submit the following files in the "Coursework 3 submission" Assignment activity on the Learning Mall Online:
- A ZIP archive of the entire NetBeans project named “CPT206 CW3 Project studentId.zip”.
- The
BudgetManager.html
Javadoc API documentation file. - The report as a PDF named “CPT206 CW3 Report studentId.pdf”, including the XipuAI conversation appendix.
- Plagiarism: This is an individual assignment. Plagiarism and collusion are not tolerated. Using generative AI is only allowed for the user interface design and implementation as described in Sections 1.4 and 2.3.
- Late Submissions: 5% of the total marks will be deducted for each working day after the deadline (up to 5 working days), as long as the mark doesn't go below the pass mark (40%). Submissions more than 5 working days late won't be accepted. # CPT206 Coursework 3