首页 > 其他分享 >CPT206 Computer Programming for Financial

CPT206 Computer Programming for Financial

时间:2024-07-25 12:06:30浏览次数:9  
标签:Financial class Programming should will their Computer employee your

CPT206 Computer Programming for Financial Mathematics:

Coursework Resit Task Specification

Thomas Selig

Set: Monday, 22 July, 2024

Due date: Sunday, 4 August, 2024, 23:59

This is the specification task sheet for the Coursework resit assessment of your CPT206 module.

The task covers all Learning Outcomes, and has a weighting of 100% towards the final grade 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, 4 August, 2024,

23:59. Detailed submission instructions are provided in Section 3.

1 Program description (70 marks)

The aim of this coursework is to build a company management system. All the work should be

coded into a single Java NetBeans project, with the class structure and different functionalities

of the program described as follows. All classes should be properly encapsulated, as seen in the

Lectures and Labs throughout the semester. Your project should also contain a Controller class

for testing. You may leave some or all of your test code in the Controller class if you wish when

submitting, but no marks are allocated for this class’s contents in your submission. Instead you

will be asked to describe your testing in the report (see Section 2.2), and marked on that.

1.1 Task class (14 marks)

The company will consist of a number of employees (see Section 1.2, each of which is assigned a

list of tasks. Each task consists of a description, status (not started, in progress, complete), and a

due date. The Task class should have the following methods:

  • isOverdue() which indicates if a task is overdue (i.e. if the due date for the task has already

passed);

  • extend(period) which extends the due date of the task by the specified period;
  • updateStatus(newStatus) which updates the task’s status; a task’s status can only be

moved forward (from “not started” to “in progress” or “complete”, or from “in progress”

to “complete”), not backwards (e.g. from “complete” to “not started”).

1.2 Employee class (18 marks)

This class will model the employees of the company. Each employee has an ID number (unique), a

name, a salary (their monthly wage), a performance indicator (see below), and a todo list of tasks

currently assigned to them (see Section 1.1). In the todo list, tasks should be ordered according to

1their due date, with the most urgent tasks placed first. You should choose a suitable data structure

in the Java collection framework for storing these. Leave a comment in your code justifying your

choice. The Employee class should also have methods to add or remove tasks from their todo list,

with the following restrictions. A task cannot be removed if it would leave them with no currently

assigned tasks. The maximum number of tasks an employee can have assigned is 20. Finally,

employees should be able to filter their todo list to get their overdue tasks.

The performance indicator takes the following possible values: below expectations, meets

expectations, above expectations, and outstanding. These map in order to numbers 0 (for below

expectations) to 3 (for outstanding), which determine the employee’s salary increase rate, as a

percentage point. At the end of each year, an employee’s salary is updated via an updateSalary()

method, which increases their salary accordingly. So if an employee’s current salary is 10, 000 and

their performance above expectations, their salary the following year will be 10, 000 (1 + 0.02) =

10, 200. By default, when a new employee is hired by the company, their performance indicator is

set to “meets expectations”, and they do not have any tasks assigned.

1.3 TemporaryEmployee class (6 marks)

The company may at times need to hire temporary employees, for example to meet specific project

deadlines. Temporary employees have all the features of the standard employees from Section 1.2,

but are on fixed-term contracts. This means that they store a date indicating when their contract

will expire. Their contract can be extended if necessary via an extendContract(period) method.

1.4 Company class (22 marks)

Finally, your program will contain a Company class to model the company’s operation. The company

should have a (legal) name, a collection of employees, and a remainingSalaryAllowance variable

indicating how much additional money the company currently has to spend on monthly salaries.

You should choose a suitable data structure in the Java collection framework for storing a company’s

employees, leaving a comment in your code justifying your choice. Companies can either be created

with a specified collection of employees, or by default with no employees.

The Company class should have the following methods. A number of these operations will effect

the company’s remaining salary allowance (for example firing an employee frees up their salary

in the allowance). You should consider all these modifications carefully, and if any causes the

remaining salary allowance to become negative, the system should throw some form of critical

error.

  • A method hire(employee) that hires a new employee, provided the remaining salary allowance

is sufficient to do so.

  • A method for firing a given employee. An employee can only be fired if their performance

indicator is “below expectations” and they have at least five overdue tasks.

  • A method evaluate(employee, indicator) for evaluating an employee’s current performance.

If they have any overdue tasks, their performance indicator can be at best “meets expectations”.

  • A method assign(task, employee) that assigns a currently unassigned task to an employee.
  • A method assign(task, oldEmployee, newEmployee) that re-assigns a task previously

belonging to oldEmployee to newEmployee.

  • Finally, there should be a method updateFinancials() to update the financial situation of

the company, as follows.

2The method should take a single parameter representing the company’s intake over the

latest period, that can be added to the remaining salary allowance.

If the company has any temporary employees whose contract has terminated, these

should be removed from the company’s employee collection.

If the method is called on January 1 (of any year), all current employees have their

salaries adjusted, as specified in Section 1.2.

1.5 Code quality (10 marks)

The remaining marks (10) will be awarded for the quality of your code, 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.

2 Report (30 marks)

For this part of the assignment, you will 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 suitable 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 (12 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 will 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 Company class1 ...

Bad example: Encapsulation and inheritance are two core features of OOP; they are used in

many parts in my program.

1Give a brief description of the purpose of the Company class here.

32.2 Testing description (12 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 will include a description of how you tested the

various parts of the program described in Section 1. You will 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. You should test in the Controller class of your project,

using only tools and techniques that we covered in the Lectures and Labs throughout the semester.

For testing, you must NOT use any new or more advanced tools such as JUnit that weren’t taught.

This section should be one-and-a-half to two pages in length (screenshots excluded).

2.3 Improvements (6 marks)

Finally, this program is, by necessity, a simplified model. In your critical evaluation document,

you will list two (2) possible improvements to the system. These could be for instance additional

features to be implemented, changes to existing features so that the system is a more accurate

reflection of a real-world system, and so on. Give a brief justification for why these would improve

the system. This part should be no longer than one page in length.

3 Submission instructions

In the dedicated “Resit submission” Assignment activity on the Learning Mall Online, you will need

to submit the following two (2) documents. The submission deadline is: Sunday, 4 August,

2024, 23:59.

  • A single ZIP archive of your entire NetBeans project. Include all the resources your

project needs to run. This file will be named “CPT206_Resit_Project_StudentId.zip”.

  • Your report from Section 2, typed into e.g. a Word document, and converted into a PDF

file. This file will be named “CPT206_Resit_Report_StudentId.pdf”.

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 not 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 date, 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.

Good luck!

4

标签:Financial,class,Programming,should,will,their,Computer,employee,your
From: https://www.cnblogs.com/vx-codehelp/p/18321609

相关文章

  • Computer Science 320SC
    ComputerScience320SC–(2024)ProgrammingAssignment1Due:Friday,July26(11:59pm)RequirementsThisfirstassignmentletsyougetfamilarwithsubmissionofsimple(butcorrectandefficient)algorithmstotheCompSci320automatedmarker.Therea......
  • CS50P: 8. Object-Oriented Programming
    Object-OrientedProgrammingturpleAtupleisasequenceofvalues.Unlikealist,atuplecan’tbemodified.can'tbemodified:tupleobjectdoesnotsupportitemassignment不能赋值Likex,y,zdefmain():name,house=get_student()print(f&qu......
  • CMP-7000A - Applications Programming
    Module: CMP-7000A- Applications ProgrammingAssignment: R002-Game Coding and Testing PresentationLearningoutcomes•    Youwilldemonstratecompetence in using Pythonprogrammingskills by creatingandcodingyourown personalgameappl......
  • ACFI3008 Financial Analysis and Valuation
    ACFI3008FinancialAnalysisandValuationTrimester2,20241. BelowisanarticlepublishedonThe Motley Fool,August7, 10:39amAESTWhyistheResMedsharepricesinkingagainonMonday?ResMedsharesarehavingaverytoughtimethismonth.TheMotl......
  • COMP9021 Principles of Programming
    COMP9021PrinciplesofProgrammingTerm2,2024Assignment2Worth13marksanddueWeek11Monday@10amGeneralMatters1.1AimThepurposeofthisassignmentisto:Developyourproblem-solvingskills.Designandimplementthesolutiontoapr......
  • COMP9021 Principles of Programming Coding Quiz 5
     COMP9021PrinciplesofProgrammingTerm2,2024CodingQuiz5Worth4marksanddueWeek8Thursday@9pmDescriptionYouareprovidedwithastubinwhichyouneedtoinsertyourcodewhereindicatedwithoutdoinganychangestotheexistingcode......
  • The 2022 ICPC Polish Collegiate Programming Contest (AMPPZ 2022)
    Preface今天由于是我们队搬毒瘤场,因此下午就不用集中训练索性继续VPUCup这场题很有外国场的风格,代码量和科技含量都不大,只要动动脑筋就行了,最后也是刚好打到了10题下班A.Aliases不难发现假设\(a=b=0\),则\(c\le\log_{10}n\le7\),因此只要考虑\(a+b+c\le7\)的情况,......
  • Toyota Programming Contest 2024#7(AtCoder Beginner Contest 362)
    ⚪题和板题大赛/jk好像能切的样子,但是太菜了,唐了8罚。A-BuyaPen输出除去某个颜色以外,其他颜色代表的最大值。点击查看代码#include<bits/stdc++.h>usingnamespacestd;inta,b,c;strings;signedmain(){cin>>a>>b>>c;cin>>s;if(s[0]=='R')a=103......
  • 2023 Henan Provincial Collegiate Programming Contest
    和零时加的队友打了一下,计算几何摆了,最优化摆了,adhoc摆了。A.小水獭游河南枚举前缀,是\(O(|\Sigma|)\)的,然后判断一下是不是回文串即可。B.ArtforRest昨天才做过这个套路的加强版。显然只用判断类似\(\max(a,b)<\min(b+1,c)\)的条件。暴力枚举是调和级数的。C.Toxel......
  • Toyota Programming Contest 2024#7(AtCoder Beginner Contest 362)
    这场比赛还是比较水的A,B,C跳过D题dij把点权和边权都转换为边权即可E题DP可以用\(map\)存一下等差数列的差先说\(O(n^4)\),\(f_{len,i,j,t}\)分别表示长度,现在在\(i\),上一个在\(j\)显然动态转移方程就有了\(f_{len,i,j,k}=\sum_{k=1}^{k=j-1}f_{len-1,j,k,t}\)点击查看......