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.

  1. 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.
java programming assignment image 1
  • Provide three buttons in the middle section of the application with the following functionality:

Button

Functionality

LU Pivot

computes the L and U factorization of the matrix with full pivoting

Inverse

compute the inverse of the matrix system

Clear

clears the output display area in the bottom part of the application (see below)

java programming assignment image 2
  • Display the results of the button presses in 2) in a scrollable area in the bottom part of the application as follows:

Button Output

LU Pivot the original matrix and vector and the lower and upper matrices, solution vector and determinant are displayed (as below)

java programming assignment image 3

Inverse: the original matrix and vector, inverse matrix and determinant and pivot vector are displayed (as below).

java programming assignment image 4

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.

  1. 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.

Exceptional conditions

  • 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 ”

java programming assignment image 5

Display area

java programming assignment image 6
  • 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 ”

java programming assignment image 7

Deliverables:

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.

Notes:

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:

  1. Application

Functionality meeting the specification 30%

Design 20%

Documentation 20%

  1. Applet – 30%
citation generator
citaion generator
make money online