Question
If the diagonal of a square is increased by 4 cm, its
area increases by 56 cm2 . Find the ratio of the new area of the square to the initial area of the square.Solution
Area of Square (A1) = a2 ................... (1) Length of diagonal (d1) = √2a .............. (2) From eq(2) → a = d1/√2 Area of square (A1) = (d1/√2)2 A1 = (d1)2/2 ........... (3) ∴ Diagonal of square increased by 4cm and its are increases by 56cm2. Increased diagonal of square (d2) = d1 + 4 ........... (4) Increased area of square (A2) = A1 + 56 .......... (5) A2 = (d2)2/2 From eq (3) we get, A2 = (d1 + 4)2/2 .......... (6) From eq (4) we get, A2 - A1 = 56 .......... (7) Substitute eq (3) and eq (6) in eq (7) ⇒ (d1 + 4)2/2 - (d1)2/2 = 56 ⇒ (d1 + 4)2 - (d1)2 = 56 × 2 ⇒ (d1 + 4)2 - (d1)2 = 112 ⇒ (d1)2 + 8d1 + 16 - (d1)2 = 112 ⇒ 8d1 + 16 = 112 ⇒ 8d1 = 112 - 16 ⇒ 8d1 = 96 ⇒ d1 = 12 ∴ d2 = d1 + 4 d2 = 12 + 4 = 16 Ratio of the new area of the square to the initial area of the square = A2 / A1 A2 / A1 = ((d2)2/2) / ((d1)2/2 ) A2 / A1 = (162 / 2) / (122 / 2) A2 / A1 = (256 / 2) / (144 / 2) A2 / A1 = 128 / 72 A2 / A1 = 16 / 9 ∴ Here, Ratio of the new area of the square to the initial area of the square A2 : A1 = 16 : 9
Complete the Java method to check if an integer array arr is empty.
public class ArrayChecker {
  public boolean isEmpty(int[] arr) {<...
You are trying to parse a JSON string in Java using a library like org.json.
import org.json.JSONObject;
import org.json.JSONException;
What is the primary purpose of a system call?
What is the primary advantage of using an Object-Oriented Programming approach?
 In a digital communication system’s block diagram, which of the below components can be found at the receiver?
Which of the following statements best describes a "trap door" in the context of computer security?
Consider the following Java code:
public class LengthMix {
  public static void main(String[] args) {
    int[] numbers...
In a perfectly balanced Binary Search Tree with N nodes, what is the worst-case time complexity for searching for an element?
Spark performs better than Hadoop MapReduce because:
Inheritance is an OOP principle that establishes an "is-a" relationship between classes. What does this relationship primarily allow?