You are a software engineer and you have been approached by a client who needs a
ID: 1550265 • Letter: Y
Question
You are a software engineer and you have been approached by a client who needs a code to calculate both settling velocity of a spherical particle and parachutist's velocity. According Stoke's Law, it is known that the settling velocity of a spherical particle in a beaker containing fluid can be estimated as: v = g/18(rho_p - rho_f/mu)d^2 where v is the downward velocity of the particle [cm/s], g is the acceleration due to gravity [= 980 cm/s^2:], rho_f is the density of the fluid [= 1.0 g/cm^3 for fresh water], rho_p is the density of the particle [=2.65 g/cm^3 for a mineral particle], mu is the dynamic viscosity of the fluid [=0.013 g/(cm s) for fresh water], and d is the diameter of the beaker [specified by the user, in cm]. Also, according to the laws of physics, it is known that if a parachutist jumps from a stationary platform, until the rip cord is pulled, the jumper's velocity can be computed with the function: v(t) = v_0^-(c_d/m)t + gm/c_d(1 - e^-(c_d/m)t) where v(t) is the downward velocity [m/s], v is the:n:tial downward velocity [=0 m/s], g is the time [s], g is the gravitational constant [= 9.8 m/s^2], m is the jumper's mass [kg], and cJ is a proportionality constant called the drag coefficient [=12.5 kg/s], which parameterizes air resistance. Tasks: Write a button-triggered VBA code which allows the user to specify the type of computations they want. Then, based on their choice, your code should CALL the appropriate FUNCTION procedure for settling velocity or the SUB procedure for parachutist's velocity, perform the computations, and display the appropriate answer. Your code should be able to display an error message in ease the user specifies a computation other than settling velocity or parachutist's velocity.Explanation / Answer
The worksheet events WILL fire when they NEED too... They won't when the selection is not appropriate.
Having said that you CAN make your command button code work like this
But then where all and what all CHECKS will you place :)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.