Java tutorial
//package com.java2s; public class Main { private static double trapezoidArea(double x1, double y1, double x2, double y2) { return Math.abs(x2 - x1) * ((y2 + y1) / 2); } }