# Tutor profile: Moses M.

## Questions

### Subject: Java Programming

Which datastructure is used to remove duplicates from a list? Demonstrate the code for removing duplicates from a Java list.

Set<Integer> a = new HashSet<Integer>(); // Adding all elements to List a.addAll(Arrays.asList( new Integer[] { 1, 3, 2, 4, 8, 9, 0 })); You can iterate this set and add the members to a new list

### Subject: Mechanical Engineering

What are the key design parameters in the design of structural beams?

A designer must consider the following: 1. Cross Sectional area, more area gives more rigidity and strength 2. The Material properties, mainly modulus of elasticity, yield strength. Different materials have different strengths 3. The points of loading and the pivoting points 4.Slenderness ratio. Long slender beams are at risk of buckling 5. Presence of stress concentrations- if load is applied near areas of stress concentration, failure is likely.

### Subject: Differential Equations

Differentiate the following: y' = -xe^y

Before solving a differential equation, you must reason what is the best approach to solving it before diving into a solution. This one is an easy candidate for separability, therefore we apply separable method. This can be rewritten as $$dy/dx = -xe^{-y}$$ dy and y's on one side, dy and x's on the other. this becomes $$ (\int e^{-y} dy = \int -x \,dx + C) $$ solve left side , it simpliifies to $$-e^{-y}$$ solving right, simplifies to $$- \frac{x^{2}}{2}+ C$$ expressing y in terms of x, we can take the ln of both sides on left $$ln(-e^{-y}) = -y $$ , on right $$ -ln(\frac{x^{2}}{2}+ C)$$ therefore $$y = -ln(\frac{x^{2}}{2}+ C)$$ where C>0