首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
program 代做、代写 Python /Java 程序
项目预算:
开发周期:
发布时间:
要求地区:
1. You will use object-oriented techniques, file processing, data types and structures you have learned throughout the semester to solve problems.
2. Submission requirements:
a. You should only submit one zip-folder with your Java project code. Only English solutions and comments are accepted. Answers need to be zipped as a java project.
b. Please name your Java project code in ONE zip folder as ‘Coursework3_YourID.’
c. You also need to submit a report in PDF format that explains the task, how you understood the question, and why you believe your solution is the best approach.
Matrix Operations
This year, you are required to complete a class that implements matrix operations. The tasks involve creating a Matrix class with various methods to handle operations such as addition, subtraction, multiplication, transposition, and determinant calculation. Please download the provided code template from the Learning Mall before starting the assignment. The template will give you a structured starting point for your implementation. Once you have completed writing your code, paste the code for each method into the respective submission boxes on the Learning Mall. The following is a detailed description of the task.
Important Note: Pay close attention to edge cases and ensure that your methods handle invalid inputs gracefully. Failure to do so will result in significant point deductions.
Task 1: Matrix Class Implementation (10 marks)
Implement the constructor for the class Matrix that will handle basic matrix operations.
● A constructor public Matrix(double[][] data) to initialize the matrix. If the input data is null or not a proper 2D array (rows with different lengths), throw an IllegalArgumentException.
Task 2: Accessor Method (10 marks)
Implement a method to retrieve the matrix data:
● public double[][] getData(): This method should return a deep copy of the data field to prevent external modification.
Task 3: Matrix Addition (15 marks)
Implement a method to add two matrices:
● public Matrix add(Matrix other): This method should add the corresponding elements of the matrices and return a new Matrix object with the result. If the matrices are not of the same size, throw an IllegalArgumentException.
Task 4: Matrix Subtraction (15 marks)
Implement a method to subtract another matrix from the current matrix:
● public Matrix subtract(Matrix other): This method should subtract the corresponding elements of the other matrix from the current matrix and return a new Matrix object with the result. If the matrices are not of the same size, throw an IllegalArgumentException.
Task 5: Matrix Multiplication (20 marks)
Implement a method to multiply the current matrix with another matrix:
● public Matrix multiply(Matrix other): This method should perform matrix multiplication and return a new Matrix object with the result. If the number of columns in the current matrix does not match the number of rows in the other matrix, throw an IllegalArgumentException.
Task 6: Matrix Transposition (10 marks)
Implement a method to transpose the current matrix:
● public Matrix transpose(): This method should return a new Matrix object with the transposed matrix.
Task 7: Matrix Determinant (20 marks)
Implement a method to calculate the determinant of the matrix:
● public double determinant(): This method should return the determinant of the matrix. For non-square matrices, throw an IllegalArgumentException. Implement determinant calculation for 2x2 and 3x3 matrices. For matrices larger than 3x3, return Double.NaN.
Example Usage and Output
This section does not need to be submitted.
public static void main(String[] args) {
double[][] data1 = {{1, 2}, {3, 4}};
double[][] data2 = {{5, 6}, {7, 8}};
Matrix matrix1 = new Matrix(data1);
Matrix matrix2 = new Matrix(data2);
Matrix sum = matrix1.add(matrix2);
Matrix difference = matrix1.subtract(matrix2);
Matrix product = matrix1.multiply(matrix2);
Matrix transpose = matrix1.transpose();
double determinant = matrix1.determinant();
// Print results
System.out.println("Sum:");
printMatrix(sum.getData());
System.out.println("Difference:");
printMatrix(difference.getData());
System.out.println("Product:");
printMatrix(product.getData());
System.out.println("Transpose:");
printMatrix(transpose.getData());
System.out.println("Determinant:");
System.out.println(determinant);
}
private static void printMatrix(double[][] matrix) {
for (double[] row : matrix) {
for (double val : row) {
System.out.print(val + " ");
}
System.out.println();
}
}
The output should be:
Sum:
6.0 8.0
10.0 12.0
Difference:
-4.0 -4.0
-4.0 -4.0
Product:
19.0 22.0
43.0 50.0
Transpose:
1.0 3.0
2.0 4.0
Determinant:
-2.0
Report
In this report, you should document your understanding of the task and provide a justification for your solution. You should also explain why you believe your code structure is well-designed and clear. Additionally, you need to test edge cases and provide a technically sound report on how your code handles these cases..
The marking is distrubuted as follows:
● Understanding of the Task: 30 marks
● Justification of Solution: 30 marks
● Clarity and Structure: 20 marks
● Handling of Edge Cases: 10 marks
● Technical Accuracy: 10 marks
Below is the marking details of report:
Criteria Excellent (90-100 marks) Good (75-89 marks) Satisfactory (60-74 marks) Needs Improvement (40-59 marks) Poor (0-39 marks)
Understanding of the Task (30 marks) Demonstrates a deep and comprehensive understanding of the task; accurately identifies all key requirements and constraints. Demonstrates a good understanding of the task; identifies most key requirements and constraints. Demonstrates a basic understanding of the task; identifies some key requirements and constraints, but with minor misunderstandings or omissions. Demonstrates a limited understanding of the task; identifies few key requirements and constraints with significant misunderstandings or omissions. Shows little to no understanding of the task; fails to identify key requirements and constraints.
Justification of Solution (30 marks) Provides a well-reasoned and convincing argument for why the solution is optimal, considering multiple factors such as efficiency, scalability, and edge case handling. Provides a solid argument for the solution, considering important factors like efficiency and scalability, though some reasoning may be less developed. Provides a basic argument for the solution, with some consideration of factors like efficiency, but lacks depth or fails to address key aspects. Provides a weak or unconvincing argument for the solution, with little consideration of important factors or only superficial reasoning. Provides no clear justification for the solution, or the justification is irrelevant or flawed.
Clarity and Structure (20 marks) Report is well-organized, with clear, logical progression; explanations are concise, precise, and easy to follow. Report is well-organized, with minor lapses in clarity or structure; explanations are generally clear, but may occasionally be wordy or unclear. Report is somewhat organized but may have several unclear sections or lack of logical flow; explanations are adequate but may be verbose or confusing. Report is poorly organized, with significant lapses in clarity or structure; explanations are often unclear or confusing. Report is disorganized, with little to no clear structure; explanations are unclear, incomplete, or difficult to follow.
Handling of Edge Cases (10 marks) Thoroughly addresses all potential edge cases, with clear and correct reasoning for how they are handled in the code. Addresses most edge cases, with generally correct reasoning for how they are handled, though some cases may be overlooked or inadequately explained. Addresses some edge cases, but may overlook important ones or provide insufficient explanations for how they are handled in the code. Addresses few edge cases, with minimal or flawed reasoning for how they are handled in the code. Fails to address edge cases or provides incorrect or incomplete explanations.
Technical Accuracy (10 marks) The technical explanation is accurate and demonstrates a strong understanding of matrix operations, including correct terminology and implementation details. The technical explanation is mostly accurate, with minor errors or omissions; demonstrates a good understanding of matrix operations, though some details may be slightly off. The technical explanation has some inaccuracies or misunderstandings; demonstrates a basic understanding of matrix operations, but may misuse terminology or overlook important details. The technical explanation has significant inaccuracies or misunderstandings; demonstrates limited understanding of matrix operations and often misuses terminology or omits important details. The technical explanation is largely inaccurate, with frequent misunderstandings and misuse of terminology; shows little to no understanding of matrix operations.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做 program、代写 c++设计程...
2024-12-23
comp2012j 代写、代做 java 设...
2024-12-23
代做 data 编程、代写 python/...
2024-12-23
代做en.553.413-613 applied s...
2024-12-23
代做steady-state analvsis代做...
2024-12-23
代写photo essay of a deciduo...
2024-12-23
代写gpa analyzer调试c/c++语言
2024-12-23
代做comp 330 (fall 2024): as...
2024-12-23
代写pstat 160a fall 2024 - a...
2024-12-23
代做pstat 160a: stochastic p...
2024-12-23
代做7ssgn110 environmental d...
2024-12-23
代做compsci 4039 programming...
2024-12-23
代做lab exercise 8: dictiona...
2024-12-23
热点标签
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
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!