Question: Olon Core Status Write a Java program called Methods that has two methods: main and distance. [5 marks] - (2 marks) The main method should:

 Olon Core Status Write a Java program called Methods that has

Olon Core Status Write a Java program called Methods that has two methods: main and distance. [5 marks] - (2 marks) The main method should: 1. Allow the user to enter 4 integer values xl, yl, x2, y2 with appropriate messages. 2. Call the distance method and pass to it the above 4 values. 3. Print out the returned result by distance method. . (3 marks) The distance method should: 1. Accept four integer values. 2. Calculate and return the distance between the two points (xl, yl) and (x2, y2) using the below equation: distance d =(x2 + x)+(92-y)" Simple run of the program: Enter the value of xl: 2 Enter the value of 1:3 Enter the value of x2:6 Enter the value of y1:2 The distance is: 72111 TTT Anal 3 (12pt) TE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!