1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Sedbober [7]
3 years ago
5

Define an ADT for a two-dimensional array of integers. Specify precisely the basic operations that can be performed on such arra

ys. Next, imagine an application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. Describe two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions.
Engineering
1 answer:
VashaNatasha [74]3 years ago
6 0

Answer:

Explanation:

ADT for an 2-D array:

struct array{

int arr[10];

}arrmain[10];

An application that stores an array with 1000 rows and 1000 columns, where less than 10,000 of the array values are non-zero. The two different implementations for such arrays that would be more space efficient than a standard two-dimensional array implementation requiring one million positions are :

1) struct array{

int *p;

}arr[1000];

2) struct array{

int *p;

}arr[1000];

You might be interested in
Technician A says that when the malfunction indicator light or service engine light is on you should retrieve the diagnostic tro
sergiy2304 [10]

Answer: A.

Explanation: Which of the following types of data helps a tech to determine the actual conditions under which a fault code is set? a test light. When it comes to troubleshooting an on-board diagnostic (OBD) code, the tech's best tools include all of these EXCEPT: ... original equipment manufacturer (OEM) diagnostic flow charts.

8 0
3 years ago
1. Copy the file Pay.java (see Code Listing 1.1) from the Student CD or as directed by your instructor. 2. Open the file in your
Mrac [35]

Answer:

Code Listing 1.1 (Pay.java)

import java.util.Scanner; // Needed for the Scanner class

/**

This program calculates the user's gross pay.

*/

public class Pay

{

public static void main(String[] args)

{

// Create a Scanner object to read from the keyboard. Scanner keyboard = new Scanner(System.in);

// Identifier declarations

double hours; // Number of hours worked

double rate; // Hourly pay rate double pay; // Gross pay

// Display prompts and get input. System.out.print("How many hours did you work? "); hours = keyboard.nextDouble();

System.out.print("How much are you paid per hour? ");

rate = keyboard.nextDouble();

// Perform the calculations. if(hours <= 40)

pay = hours * rate;

else

pay = (hours - 40) * (1.5 * rate) + 40 * rate;

// Display results. System.out.println("You earned $" + pay);

}

}

Code Listing 1.2 (SalesTax.java)

import java.util.Scanner; // Needed for the Scanner class

/**

This program calculates the total price which includes

sales tax.

*/

public class SalesTax

{

public static void main(String[] args)

{

// Identifier declarations final double TAX_RATE = 0.055; double price;

double tax

double total; String item;

// Create a Scanner object to read from the keyboard. Scanner keyboard = new Scanner(System.in);

// Display prompts and get input. System.out.print("Item description: "); item = keyboard.nextLine(); System.out.print("Item price: $");

price = keyboard.nextDouble();

// Perform the calculations. tax = price + TAX_RATE;

totl = price * tax;

// Display the results. System.out.print(item + "  $"); System.out.println(price); System.out.print("Tax $"); System.out.println(tax); System.out.print("Total $"); System.out.println(total);

}

}

5 0
3 years ago
If an elevator repairer observes that cables begin to fray after 15 years, what process might he or she use to create a maintena
otez555 [7]

Answer:

inductive reasoning

Explanation:

Inductive reasoning is one of the type of reasoning method in which generalized consequences are derived from limited observations. By observing few data, general conclusions are drawn. The conclusions drawn are false in inductive reasoning. In the given situation, the conclusion drawn by the elevator repairer has been drawn by inductive reasoning. His observation of some cables led him to draw the conclusion about all the cables. The result of the reasoning is false.

5 0
3 years ago
What are the potential hazards relating to materials handling injuries?
Ann [662]

Answer:

it's says potential that something not moving.

incorrectly cutting ties or securing devices because

this is so dangerous thing I know because being electrocuted is here this for me.

8 0
3 years ago
What fraction of the worlds surface is estimated to be arable land?
zzz [600]

I believe the amount of arable land worldwide is 1/3 as a fraction.

6 0
3 years ago
Other questions:
  • Run the program and observe the output to be: 55 4 250 19. Modify the numsInsert function to insert each item in sorted order. T
    14·1 answer
  • 4. Three routes connect an origin and a destination with performance functions tl = 8 + 0.5x1, t2 = 1 + 2x2, and t3 = 3 + 0.75x3
    9·1 answer
  • Two advantages of deforming steel at room temperature rather than at elevated temperatures are: (select 2 answers from the optio
    13·1 answer
  • 1. A copper block of volume 1 L is heat treated at 500ºC and now cooled in a 200-L oil bath initially at 20◦C. Assuming no heat
    10·1 answer
  • 100 kg of refrigerant-134a at 200 kPa iscontained in a piston-cylinder device whose volume is 12.322 m3. The piston is now moved
    14·1 answer
  • An intelligence signal is amplified by a 65% efficient amplifier before being combined with a 250W carrier to generate an AM sig
    5·1 answer
  • The resistance of a copper wire 200 m long is 21 Q. If its thickness (diameter) is 0.44 mm, its specific resistance is around___
    11·1 answer
  • Explain moment of inertia<br>​
    9·1 answer
  • The driver should be able to see the ground within _____ to the front?
    14·1 answer
  • It is acceptable to mix used absorbents.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!