Java Programming Assignment
MSc: Computational & Software Techniques in Engineering Software Engineering for Technical Computing option
The assignment consists of writing a A) Java application and B) Java applet to enter and then display the solution to a system of linear equations.
- A) The application should provide the following functionality
- Allow input of the matrix system and right hand side vector in two side by side scrollable areas in the top part of the application.
- Provide three buttons in the middle section of the application with the following functionality:
computes the L and U factorization of the matrix with full pivoting
compute the inverse of the matrix system
clears the output display area in the bottom part of the application (see below)
- Display the results of the button presses in 2) in a scrollable area in the bottom part of the application as follows:
LU Pivot the original matrix and vector and the lower and upper matrices, solution vector and determinant are displayed (as below)
Inverse: the original matrix and vector, inverse matrix and determinant and pivot vector are displayed (as below).
4) Add two more buttons named Load and Save. The Save button should save the result of a successful computation to persistent storage. The Load button should allow the user to load a previously saved computation.
- B) Convert your application to an applet. The application should have the same functionality as the application but without the Load/Save buttons and operations.
- If the matrix of data and/or right hand side vector entered in the top part of the application is not correct in some way (i.e not enough data, size of matrix and rhs don’t match, data has not real numbers), then the application should simply display a message
“ error in matrix input ”
- If there is no LU decomposition and matrix is singular then the result of pressing either LU Pivot or Inverse should be the display of the original matrix and vector followed by the text
No LU decomposition singular matrix ”
Two jar (Java Archive) files containing the compiled source code of your application and applet
An html file containing an applet tag referencing the archive file. Loading the html file into a Java enabled browser should run the applet (see final
exercise in RainForest application).
A zip file containing the .java files and the accompanying javadoc documentation for the application and applet.
You can convert any of the code from exercise 3 of the C++ exercises that you feel would be useful.
Your classes should be documented appropriately using javadoc.
The distribution of marks is as follows:
Functionality meeting the specification – 30%
Design – 20%
Documentation – 20%
- Applet – 30%