# Access over 20 millionhomework & study documents

Content type
User Generated
Rating
Showing Page:
1/3
Solution
class Arrow {
double velocity;
double angle;
public Arrow() {
velocity = 20;
angle = 10;
}
public Arrow(double vel, double ang) {
velocity = vel;
angle = ang;
}
public void setVelocity(double vel) {
velocity = vel;

Showing Page:
2/3
}
/**
* A method to set the value of angle
* @param ang
*/
public void setAngle(double ang) {
angle = ang;
}
public double getVelocity() {
return velocity;
}
public double getAngle() {
return angle;
}
public double getHeight() {
double g = 9.8;
double Height = Math.pow(velocity, 2) *
Math.pow((Math.sin(angle)), 2) / (2 * g);
return Height;
}
}

Showing Page:
3/3

Unformatted Attachment Preview
please help with this question Solution //Answer: class Arrow { double velocity; double angle; /*Answer A */ public Arrow() { velocity = 20; angle = 10; } /*Answer B */ public Arrow(double vel, double ang) { velocity = vel; angle = ang; } /*Answer C */ public void setVelocity(double vel) { velocity = vel; } /*Answer E */ /** * A method to set the value of angle * @param ang */ public void setAngle(double ang ) { angle = ang; } public double getVelocity() { return velocity; } public double getAngle() { return angle; } /*Answer D */ public double getHeight() { double g = 9.8; double Height = Math.pow(velocity, 2) * Math.pow((Math.sin(angle)), 2) / (2 * g); return Height; } } Name: Description: ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

### Review

Anonymous
Very useful material for studying!

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4