|
Aims and Objectives: Provide an opportunity for students to design and implement a more substantial software system (than those produced for parcticals 1 and 2) that, in addition, requires use of methods contained in the Math class found in the Java API.
Produce a computer program, written in the Java programming language, which determines the distance travelled by a projectile (projected from the ground) given:
Assume the following:
Note also that to solve the above we must carry out the following steps.
Vertical component of launch velocity (Vu) = u x sinA Horizontal component of launch velocity (Hu) = u x cosA
t = (2 x Vu)/awhere a (deceleration due to gravity) is equivalent to g (10m/s^2 in this case).
s = Hu x t
A body is projected with a velocity of u = 200 m/s at an angle of elevation A = 30 degrees above the horizontal. Determine the distance traveled by the projectile.
Vu = 200 x sin30 = 100 (m/s) Hu = 200 x cos30 = 173.2 (m/s) t = {2 x 100)/10 = 20 (s) s = 20 x 173.2051 = 3464.1 (m)
You should prepare a report comprising the following sections:
All supporting documentation (i.e. excluding your Java source source files) should be prepared as a single Microsoft Word file. Once completed you should "up load" your Java source files (extension .java) and your word document to the CS department's electronic "practical assignment submission" system.
Refer to guidance notes on the execution of COMP101 practicals and the presentation of work if necessary. You might also like to refer to the vertical motion example studied in week 5, and the work on trigonometric ratios studied in week 4.
90% of the marks will be distributed evenly between: Analysis and Design; Implementation; and Testing. The remaining 10% will be awarded for "overall presentation".
Created and maintained by Frans Coenen. Last updated 30 October 2006