Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Write a Program in Java, which determines the distance travelled by a projectile (launched from the ground) given:

1. The velocity at launch (u), and

2.The launch angle (angle of elevation) above the horizontal (A).

The program should consist of two files: Launch.java and LaunchApp.java (application).

Assume the following:

1. The angle of elevation is given in degrees and is in the range of 0 to 90.

2. Start velocity is given as a positive number.

3. Gravity (g) is equivalent to 10m/s ^ 2.

4. Ignore air resistance.

Note also that to solve the above we must carry out the following steps:

1. Calculate the vertical and horizontal components of u (the launch velocity) using the following trigonometric identities:

Vertical component of launch velocity (Vu) = u x sinA
Horizontal component of launch velocity (Hu) = u x cosA

2. Calculate the time (t) taken for the body to return to the ground using the identity:

t = (2 x Vu) / a

where a (deceleration due to gravity) is equivalent to g (10m/s ^ 2 in this case).

3. Calculate distance (s) travelled from the identity:

s = Hu x t

EXAMPLE:

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 travelled 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)

Remember to write the source code for each class in a separate file which must have the same name as the class name together with the extension .java. Remember also that by convention, class names commence with a capital letter.

You should provide a well-structured solution that is easy to read. You should use meaningful identifier names and should provide useful comments.

1279_l1.png

1607_l2.png

Java, Programming

  • Category:- Java
  • Reference No.:- M91612967
  • Price:- $20

Priced at Now at $20, Verified Solution

Have any Question?


Related Questions in Java

Project descriptionwrite a java program to traverse a

Project Description: Write a java program to traverse a directory structure (DirWalker.java) of csv files that contain csv files with customer info. A simple sample in provided in with the sample code but you MUST will r ...

Assessment -java program using array of Assessment -JAVA Program using array of objects

Assessment -JAVA Program using array of objects Objectives This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details For this assignment, you are required to develop a Windowed G ...

Assessment instructionsin this assessment you will design

Assessment Instructions In this assessment, you will design and code a simple Java application that defines a class, instantiate the class into a number of objects, and prints out the attributes of these objects in a spe ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Question slideshows or carousels are very popular in

Question : Slideshows (or carousels) are very popular in websites. They allow web developers to display news or images on the website in limited space. In this code challenge, you are required to complete the JavaScript ...

Part a specification - robot simulationpart a

PART A Specification - Robot Simulation PART A Requirements To complete this assignment you will use the supplied eclipse project Robot P1/. It is already set up to execute a simple arm movement loop which you will build ...

Can someone help me please with those question1what is the

Can someone help me please with those question 1:what is the best data type for student id datatime,currency,number,decimal 2:which relationshipis preferable? one to one,one to many,many to many 3:if you add table A's pr ...

Can someone please help me with the following java

can someone please help me with the following java question The input is an N by N matrix of nonnegative integers. Each individual row is a decreasing sequence from left to right. Each individual column is a decreasing s ...

In relation to javaa what is constructor the purpose of

(In relation to Java) A. What is constructor? the purpose of default constructor? B. How do you get a copy of the object but not the reference of the object? C. What are static variables and instance variables? D. Compar ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As