Calculate the value of its secondary diagonal

Assignment Help JAVA Programming
Reference no: EM132430546

Given a square matrix m[3x3], create java code to calculate the value of its SECONDARY Diagonal. See example below.

Hint: In order to better understand the concepts involved in this exercises, research the terms "square matrix" and "secondary diagonal of a matrix" using your favourite search engine.

Example given matrix m[3x3] shown below:

(0,0) (0,1) (0,2)|10 12 11(1,0) (1,1) (1,2)|9 8 31(2,0) (2,1) (2,2)|2 16 24

Secondary Diagonal (generic m[3x3]) = m[0,2] + m[1,1] + m[2,0]

Secondary Diagonal (as in the example above) = 11 + 8 + 2 = 21

Note 1: Your java code MUST be GENERIC to calculate the secondary diagonal of ANY square matrix [2x2], [3x3],[4x4], etc. (Use a constant in your code to set the values of numberOfRows and numberOfColumns of your matrix.

Note 2: Your matrix m may be hardcoded (no need of user interaction)

Note 3: In case numberOfRows and numberOfColumns ar differents, your program must display the following message: "This is not a square matrix."

Reference no: EM132430546

Questions Cloud

What might use writing skills beyond academia in real life : What other ways might you use writing skills beyond academia in "real life?
Prepare the necessary journal entries if the wages paid : The payroll of Marigold Company for September 2016 is as follows. Prepare the necessary journal entries if the wages and salaries paid
What was the reaction clifton strengthsfinder report : How are you using one or more of your Signature Themes in your daily life? What steps could be taken to ensure you have an opportunity to apply your natural
Question on dynamic array : Describe any feedback you received or any specific interactions you had. Discuss how they were helpful
Calculate the value of its secondary diagonal : Given a square matrix m[3x3], create java code to calculate the value of its SECONDARY Diagonal. See example below.
Interface for controlling access to general class of actions : The approach which lies beneath this concept is "single interface with multiple implementations." It offers a single interface for controlling access
Code of Ethics of the National Association of Social Workers : Code of Ethics of the National Association of Social Workers Assignment help and solutions:-explain how it relates to career goals
Implement a static void method called multiplicationtable : Implement a static void method called multiplicationTable which accepts a positive integer n and print the multiplication table starting at 1 up to and includin
What is abstract data type : What is Abstract Data Type(ADT) Actually? If the Stack just allow a data entered is integer type, is that stack considered ADT? Or is the stack only considered

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd