ADP Interview Question for Applications Developers
- 1of 1 vote
Need Java Program :- sarath.chalasani46 March 31, 2016 in India
A rectangular plot comprising n*m block ( cement block in shape of a cube) were kept, one block per each cell. the base of
each block covers one cell completely and its surface is equals to one square meter. cube on adjacent cell are so close
that there are no gaps between them.due to a heavy rain on the constuction, water is accumulated in the gaps created
between a group of blocks due to the difference in their heights.
write a program to calculate the volume of water accumulated between the blocks on the constrution.
your function must read three arguments i.e plot_length,plot_breadth and block_height
- Plot_length (r) : provides the length of each rectangular plot in metres.
- Plot_breadth (c) : provides the breadth of each rectangular plot in metres.
- Block_height(int array) : provides the height of r*c blocks row-wise.
output will be an integer that will depict the volume of water (in cubic metres) accumulated in the puddles due to the
difference in heights of block.
| Report Duplicate | Flag | PURGE
ADP Applications Developer
Open Chat in New Window