- Joined
- Nov 22, 2023
- Messages
- 16
- Reaction score
- 0
have anyone can give some code of Shoelace Formula program ?
task:
Read a set of Pi(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5) parameters representing some polygons from a text file,
e.g. polygonVertices.txt.
-44 -42 -50 -53 -28 -51 55 -37 99 21
…
…
58 -86 62 -55 100 60 70 75 -19 72
Write a Java method to calculate the area of ten polygons by passing their
parameters as inputs. (15 marks)
Display the polygons vertices as shown in part (A) in Appendix A. (together with their number) (15 marks)
Display the smallest and the biggest area (together with their number)
as shown in part (B) in Appendix A. (30 marks)
Display the 5 biggest polygon (together with their number, area and vertices) as shown
in part (C) in Appendix A.
deadline: 28 November
task:
Read a set of Pi(x1,y1,x2,y2,x3,y3,x4,y4,x5,y5) parameters representing some polygons from a text file,
e.g. polygonVertices.txt.
-44 -42 -50 -53 -28 -51 55 -37 99 21
…
…
58 -86 62 -55 100 60 70 75 -19 72
Write a Java method to calculate the area of ten polygons by passing their
parameters as inputs. (15 marks)
Display the polygons vertices as shown in part (A) in Appendix A. (together with their number) (15 marks)
Display the smallest and the biggest area (together with their number)
as shown in part (B) in Appendix A. (30 marks)
Display the 5 biggest polygon (together with their number, area and vertices) as shown
in part (C) in Appendix A.
deadline: 28 November