An adt called squarematrix

Assignment Help Basic Computer Science
Reference no: EM13669419

Consider an ADT called SquareMatrix. (The matrix can be represented by a two-dimensional array of integers with n rows and n columns.)
a. Write the specification for the ADT as a Java interface. Include the following operations (parameters are already listed for the first two operations; for the remaining operations you must determine which parameters to use yourself, as part ofthe exercise):
· MakeEmpty(n) , which sets the first n rows and columns to zero
· StoreValue(i, j, value) , which stores value into the position at row i, column j
· Add, which adds two matrices together
· Subtract, which subtracts one matrix from another
· Copy, which copies one matrix into another
b. Create a Java class that implements the interface. Assume a maximum size of 50 rows and columns.
c. Create a small application that uses the class.

Reference no: EM13669419

Questions Cloud

Basic business skills play a role in your professional life : How will basic business skills play a role in your professional life?
Linear programming case study : Explain what the results mean - write a paragraph addressing the part of the problem pertaining to sensitivity analysis and shadow price.
The ceo throws a billion dollar party : The CEO throws a billion dollar party
Compute the force acting on the electron : In the Bohr model of the hydrogen atom, the speed of the electron is approximately 2.20 x 106 m/s. Compute the force acting on the electron as it revolves in a circular orbit of radius 5.30 x 10-11 meter
An adt called squarematrix : An ADT called SquareMatrix
Calculate what is his power output : A 685 N Marine in basic training climbs a 9.00 meter vertical rope at a constant speed in 6.00 second. Determine what is his power output
Find how does this power compare with the motor power : A 750 kilogram elevator starts from rest. It moves upward for 3.50 second with constant acceleration until it reaches its cruising speed, 1.75 m/s. Find how does this power compare with the motor power when the elevator moves at its cruising speed
Determine what the average power delivered to the train : The electric motor of a model train accelerates the train from rest to 0.665 m/s in 25.0 milliseconds. Determine the average power delivered to the train during the acceleration
Autocratic leader versus a democratic leader : What are the traits of an autocratic leader versus a democratic leader, and is one type of leadership better than the other? Please use the CSU Online Library to search for those leadership styles in order to explain your answer.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  What would be the best choice of the degree

A B+ - tree index is to be built on the name attribute of the relation student. Assume that all the student names are o length 8bytes, disk blocks are of size 512 bytes , and index pointer are of size 4bytes. Given this scenariom, what would be th..

  Determine finish tag-packet-by-packet fair queueing system

Let the packet-by-packet fair queueing system with three logical buffers and with service rate of one unit/second. Determine finish tag, order of transmission and actual packet completion times for each packet arrival.

  Characterize a page fault rate using pure demand paging

Consider system which uses pure demand paging: When a process first start execution, how would you characterize a page fault rate?

  Write a program which declares an array of 51 integers

Then print the median number. Be sure not to write more than 51 prime numbers in the array, that would be writing past the end of the array and that is not good.(c++) Please solve in a c++ method.

  Explain what can-t be measured can-t be effectively managed

According to the following quote "what can't be measured can't be effectively managed." The question is can everything that is important in network security be measured using metrics or any other process? Why or Why not?

  Elway business services

You have been asked by Elway Business Services Inc. to evaluate the possible financial loss that could be accrued by threats to its servers. You decide to use the ALE equation to estimate this cost. As a starting point, EBS provides the follow..

  Program that allows a user to enter 10 item stock

Write a program that allows a user to enter 10 item stock numbers, prices, quantities in stock into three parallel arrays. Display all the data in report form - that is, aligned correctly in columns.

  Write a procedure homming

Submit your programs by email. The program should have as many comments as necessary. The top comments should explain how to run and test the program. If any two assignments have the same code, zero marks will be assigned to the assignments.

  Explaining firewalls and virus protection software

Lots of people who connect their systems to the Internet rush out and purchase latest copies of firewalls and virus protection software.

  Give the contents of eax

in each additional instruction in this problem, assume that EAX contains a given contents before the instruction is executed, and give the contents of EAX as well as the values of the CF, OF, SF, and ZF flags after the instruction is executed:

  Write a complete program to ask the user for a phrase

Total number of blanks and total number of lines and print them. 3. Total number of words and print them. The word is string of characters separated by blank.

  Create an n by m array

Create an n by m array (n, m input by user). Initialize all cells in array to 0. The bug starts at cell 1,1. The bug can jump from its cell to any neighboring cell (left, right, up, down, diagonal) -- so there are at most 8 neighboring cells. Thou..

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