Download and uncompress 10b matrices.zip. Extract the files to your computer and open an Eclipse project yourLastName10b, then add these files to your project.
Define your own exception class that extends Exception, name this class "NonCompatibleMatricesException." The class should only have two constructors. The defalult constructor calls the parent constructor and the second constructor is overloaded to handle a String parameter message, use the following statements:
super("Matrices not compatible: require mXk, kXn
to multiply; same size to add/subtract");
super("Matrices not compatible: "+ message + "\nRequire mXk,
kXn to multiply.\nRequire same sizes to add/subtract");
Modify the add method that returns an int array and takes two int
arrays as parameters to perform the addition. Run the program
Part1. Your output should be similar to this:
What statements in the main method did not execute? Why?
Modify all the overloaded add methods to perform the
operations indicated and to catch the NonCompatibleMatricesException. Instead of
skipping steps and exiting, your program should print the exception's message
and continue running the main method. Output should be similar to this:
Modify the overloaded multiply methods to function as indicated.
Throw and catch the NonCompatibleMatricesException so the size of the
incompatible matrices is displayed. Run the program Part2.
Email your completed Matrices.java file as an attachment to to either CSC221.001@uncw.edu or CSC221.002@uncw.edu