Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a calculator program (in JAVA) have functions: addition, subtraction, multiplication functions for matrix. Function details: Function 1: Display a menu and ask users to

Write a calculator program (in JAVA) have functions: addition, subtraction, multiplication functions for matrix.

Function details:

Function 1: Display a menu and ask users to select an option.

  • Users run the program. The program prompts users to select an option.

  • Users select an option, perform Function 2.

Function 2: Perform function based on the selected option.

  • Prompt users input number of row, number of column of 2 matrixes.

  • Prompt users input values of matrixes must be the number. If users input values that are not a number, display notification on the screen: Values of matrix must be the number.

  • Option 1: Addition matrixes

  • Display result.

  • Option 2: Subtraction matrixes

  • Display result.

  • Option 3: Multiplication matrixes

  • Display result.

  • Option 4: Exit program.

Expectation of User interface:

Guidelines

Student must implement methods

additionMatrix

subtractionMatrix

multiplicationMatrix

in startup code.

Function 1: Addition matrixes

  • Implement function: public int[][] additionMatrix (int[][] matrix1, int[][]matrix2)

  • Input:

  • matrix1: The first matrix.

  • matrix2: The second matrix.

  • Return values: The result.

Function 2: Subtraction matrixes

  • Implement function: public int[][] subtractionMatrix (int[][] matrix1, int[][]matrix2)

  • Input:

  • matrix1: The first matrix.

  • matrix2: The second matrix.

  • Return values: The result.

Function 3: Multiplication Matrixes

  • Implement function: public int[][] multiplicationMatrix(int[][] matrix1, int[][]matrix2)

  • Input:

  • matrix1: The first matrix.

  • matrix2: The second matrix.

  • Return values: The result.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

More Books

Students also viewed these Databases questions

Question

What was the role of the team leader? How was he or she selected?

Answered: 1 week ago

Question

What are the Five Phases of SDLC? Explain each briefly.

Answered: 1 week ago

Question

How can Change Control Procedures manage Project Creep?

Answered: 1 week ago