Math for - OOP: Classes

  1. A manufacturing plant creates rectangular metal sheets. The design blueprint for a sheet specifies that it must have a length ($L$) and a width ($W$).

    1. If a specific sheet is manufactured with $L = 12 \text{ cm}$ and $W = 7 \text{ cm}$, what is its area?

    2. Another sheet is manufactured with $L = 9 \text{ cm}$ and $W = 9 \text{ cm}$. What is its perimeter?

  2. A 'DataProcessor' unit is defined by two input values, $X$ and $Y$. It can perform two distinct operations:

    • Operation 'Alpha': Result $A = 2X + Y$
    • Operation 'Beta': Result $B = X \times Y - 5$

    If a DataProcessor unit is configured with $X=5$ and $Y=8$:

    1. Calculate the result of its 'Alpha' operation.

    2. Calculate the result of its 'Beta' operation.

  3. A 'Vector2D' object is characterized by an x-component and a y-component. Consider two such Vector2D objects:

    • $V_1$ is created with an x-component of $4$ and a y-component of $-3$.
    • $V_2$ is created with an x-component of $-2$ and a y-component of $6$.
    1. What is the sum of the x-components of $V_1$ and $V_2$?

    2. If a new Vector2D, $V_3$, is formed by adding $V_1$ and $V_2$ (component-wise: $V_{3x} = V_{1x} + V_{2x}$, $V_{3y} = V_{1y} + V_{2y}$), what are the components of $V_3$?

  4. In an engineering project, two types of structural elements are used. Their strength ratings are calculated as follows:

    • 'ElementModel_S': Strength $S_S = 15k - 2d^2$, where $k$ is a material factor and $d$ is a dimension in meters.
    • 'ElementModel_T': Strength $S_T = \frac{100}{w} + 3h$, where $w$ is width and $h$ is height, both in meters.

    A structure uses one ElementModel_S with $k=10$ and $d=3 \text{ m}$, and one ElementModel_T with $w=5 \text{ m}$ and $h=4 \text{ m}$. Calculate the total combined strength rating from these two elements.

  5. A 'SensorModule' is designed to be a perfect cube, defined by its side length 's' (in mm). The module's volume is given by $V = s^3$ and its external surface area by $A = 6s^2$.

    1. If the side length 's' of a SensorModule is $10 \text{ mm}$, calculate its Volume and Surface Area.

    2. 'What if' the design is updated so that the new side length $s_{new}$ is three times the original side length $s_{original}$? How many times larger will the new Volume be compared to the original Volume? How many times larger will the new Surface Area be compared to the original Surface Area? Express your answer in terms of factors (e.g., "X times larger").