代做CPT206 Computer Programming for Financial Mathematics调试Java编程

CPT206 Computer Programming for Financial Mathematics:

Resit Task Specification

Set: Monday 14 July, 2025

Due date: Sunday 27 July, 2025, 23:59

This is the specification task sheet for the resit assessment of your CPT206 module. The task covers all Learning Outcomes, and accounts for 100% of the final mark for this module. This assignment has two parts: a coding part described in Section 1, and a report described in Section 2. The submission deadline for this assignment is Sunday 27 July, at 23:59 (China-time). Detailed submission instructions are provided in Section 3.

1 Program description (70 marks)

The aim of this coursework is to build a loan calculator system. All the work should be coded into a single Java NetBeans project, with the class structure and different functionalities of the program described below. All classes should be properly encapsulated, as seen in the Lectures and Labs throughout the semester. Your project should also contain a main class for running the application.

1.1 (VariableInterest)Loan class (15 marks)

The Loan class will be a base class representing a loan. Each loan stores a principal (the amount of the loan), an annual interest rate, and a term (the duration of the loan, in years). Loans should be ordered as follows:

• If the terms differ, they should be ordered by term;

• If the terms are the same, they should be ordered by principal;

• If the terns and principals are both the same, they should be ordered by interest rate.

There will be a subclass VariableInterestLoan which allows for adjustment of the annual interest rate. The interest rate must remain between 1% and 20%. Adjustments are handled via a method adjustInterestRate(double ratio) which multiplies the interest rate by the specified ratio. If this would cause the rate to fall below 1%, it is simply adjusted to 1% instead. Similarly, if this would cause it to exceed 20%, it is adjusted to 20%.

1.2 PaymentEntry class (9 marks)

Loans need to be repaid. This process will normally follow a amortised payment schedule (see Section 1.3 where a certain amount of the loan is repaid every month for the duration of the loan. Each monthly payment will be an instance of the PaymentEntry class. A payment entry object will store the following information:

• the month number of the payment (i.e., a number between 1 and 12 times the term of the loan);

• the remaining balance on the loan prior to the payment;

• the payment amount, which will be broken down into principal paid and interest paid in that month.

1.3 AmortisationSchedule class (8 marks)

The AmortisationSchedule represents the entire payment schedule for a given loan. It simply stores a collection of PaymentEntry objects. When an AmortisationSchedule object is created, this collection is empty. The most frequent operation on this collection will be adding the latest payment. This should be done via an addPaymentEntry(PaymentEntry entry) method, and payment entries in the schedule should always be ordered from least recent to most recent (here, “recent” refers to the order in which entries are added to the schedule). You should choose an appropriate object of the Java collection framework to store the collection of payment entries in the schedule, and leave a comment in your code clearly detailing and explaining your choice.

1.4 LoanCalculator class (18 marks)

This class will store a Loan instance, and be responsible for various calculations related to this loan.

• The class should have a calculateMonthlyPayment() method. This calculates the regular monthly payment amount over the duration of the loan, when the interest rate is taken into account. You may apply the following formula:

                      (1)

where:

– M is the monthly payment amount (the quantity to calculate);

– P is the loan principal (the initial loan amount);

– r is the monthly interest rate (the annual interest rate divided by 12);

– n is the total number of payments (the loan term in years multiplied by 12).

• The class should have a method to generate the full amortisation schedule for repayment of this loan. The method should return an AmortisationSchedule as defined in Section 1.3 above. In this schedule, the successive monthly PaymentEntry objects are generated as follows:

– Before each monthly payment is made, there is a remaining balance on the loan, which will be the remaining balance for the payment entry.

– The interest paid in the entry is this remaining balance multiplied by the montly interest rate r from Equation (1) above.

– The principal paid in the entry is the difference between the total monthly payment amount given by M in Equation (1) and this interest paid.

– The first payment entry occurs in month number 1, the second in month number 2, and so on.

• The class should have methods to calculate the total payment amount and total interest paid over the course of the entire schedule.

1.5 File I/O (10 marks)

In order to create a more useful application that allows data to persist when the program stops running, you should add File I/O (Input/Output) elements to your program. File I/O refers to the process of reading data from and writing data to files on a storage medium (such as a hard drive). Since this not been taught in this course this semester, you will have to learn how to write suitable methods, and integrate them into your loan calculator project. To do this, you should enlist the help of XipuAI (for more details, see Section 2.3).

Your File I/O elements should allow data from your various classes to be stored in files in your computer system. You should select appropriate file types to do this (for example, a simple CSV file may not be appropriate for more complex data types). You should also include methods to load data from files into local memory when starting the program, and ensure this data is stored in appropriate data structures. In addition, your File I/O elements should incorporate exception handling according to best practices. Finally, you may wish to add more complex File I/O elements of your choosing to the program.

1.6 Code quality (10 marks)

The remaining marks (10) will be awarded for the quality of your code and documentation, as covered throughout the semester in the Lectures and Labs.

• Keep your code neat and tidy; make sure it is properly indented throughout.

• Choose suitable names for variables and methods, respecting standard Java naming conventions.

• Comment your code as needed.

• Split your code into separate methods as appropriate; methods should not be too long.

You should also write Javadoc comments for the entire API of the LoanCalculator class from Section 1.4, and submit the corresponding generated Javadoc file “LoanCalculator.html” (see detailed submission instructions in Section 3). You do not need to write Javadoc comments for the other classes.

2 Report (30 marks)

For this part of the assignment, you should write a report detailing how you designed, implemented, and tested the program described in Section 1. The report should be typed into e.g. a Word document, and submitted as a PDF (see Section 3 for more details). Where appropriate in the report, you should refer to specific lecture slides (or parts of Lab worksheets), e.g. “as seen in Lecture 10, slides 32-34”.

2.1 OOP features (10 marks)

Over the course of the semester, you have learned a number of OOP features (e.g encapsulation) and principles (e.g. single responsibility principle). In your report, you should explain where you have incorporated these in your design and how you have done so; include a brief definition of the features/principles in question. Be as precise as possible, illustrating with small portions of code if necessary. Note that not all the features and principles we saw in the lectures need to be incorporated into your design; your report should only discuss those that are. This section should be one-and-a-half to two pages in length.

Good example: The Single Responsibility Principle states that every class in the program should have responsibility over a single functionality of the program; a class should do one thing. This principle is incorporated into our class design: all the classes have their own, separate, purpose. For instance, the Loan class...

Bad example: Encapsulation and inheritance are two core features of OOP; they are used in many parts in my program.

2.2 Testing description (10 marks)

As covered throughout the Lectures and Lab sessions in this module, testing is an essential part of writing computer programs. In your report, you should include a description of how you tested the various parts of the program described in Section 1. Your testing may use the JUnit framework, or simply manually check cases in the main class. Your report should state clearly what functionalities you tested, and describe how you tested them, thinking carefully about possible corner cases. You may include some sample code if you wish. This section should be one-and-a-half to two pages in length (screenshots excluded).

2.3 AI-assisted File I/O (10 marks)

As stated above, you should use XipuAI to teach you how to incorporate File I/O elements into program. You may use AI in any part of this process. For example, you may wish learning about basic concepts of File I/O, exception handling, etc., or you might use AI for assistance in code-writing, and so on. In your report, you should explain which File I/O elements you have inclued in your program, and how they are implemented. This may include a discussion of the different file types for storing different data types, your exception handling mechanisms, any additional elements you chose to include, and so on. You should explain your use of XipuAI by detailing clearly how it helped you write and incorporate these elements, which aspects you used it for, and so on. Remember that you do not have to blindly accept all AI output as inherently correct: critical reflection on AI’s answers and suggestions will be welcome.

The marking for this section of the report will be broken down into 5 marks for the explanation of the File I/O elements and 5 marks for your use of AI tools. This section should be no more than two pages in length, screenshots excluded. You should attach the entire transcript. of your conversation(s) with XipuAI in an appendix to the report (you can save the entire conversation for example by clicking the “Export” button in the interface below).

3 Submission instructions

In the dedicated “Coursework 3 submission” Assignment activity on the Learning Mall Online, you will need to submit the following two (2) documents.

• A single ZIP archive of your entire NetBeans project. Include all the resources your project needs to run (including files that you wish to read from and/or write to). This file should be named “CPT206 Resit studentId.zip”.

• The online Javadoc API documentation file of your LoanCalculator class, as specified in Section 1.6. This is the “LoanCalculator.html” file generated by your project. You do not need to rename this file.

• Your report from Section 2, including the appendix of your conversation(s) with XipuAI, typed into e.g. a Word document, and converted into a PDF file. This file should be named “CPT206 Resit studentId.pdf”.

The submission deadline is: Sunday 27 July, 2025, at 23:59 (China-time).

This assignment is individual work. Plagiarism (e.g. copying materials from other sources without proper acknowledgement) is a serious academic offence. Plagiarism and collusion will not be tolerated and will be dealt with in accordance with the University Code of Practice on Academic Integrity. Submitting work created by others, whether paid for or not, is a serious offence, and will be prosecuted vigorously. The use of generative AI for content generation is permitted only in the design and implementation of your application’s file I/O elements, as detailed in Sections 1.5 and 2.3. No other use of generative AI for content generation is permitted on this assignment. Such a use would be considered in breach of the University Code of Practice on Academic Integrity, and dealt with accordingly. Individual students may be invited to explain parts of their code in person during a dedicated interview session, and if they fail to demonstrate an understanding of the code, no credit will be given for that part of the code.

Late submissions. The standard University policy on late submissions will apply: 5% of the total marks available for the component shall be deducted from the assessment mark for each working day after the submission deadline, up to a maximum of five working days, so long as this does not reduce the mark below the pass mark (40%); submissions more than five working days late will not be accepted.





热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图