subject

Assume a class Triangle has been defined. It has three instance data, Point p1, p2, p3. The class also has a constructor that receives the 3 Points and initializes p1, p2, and p3, a toString method that outputs the 3 Points, and a computeSurfaceArea method that calculates the surface area of the Tetrahedron (as an int value). We want to extend this class to represent a 3-dimensional Tetrahedron (the Pyramid with triangle base), which consists of 4 Points. Since the Tetrahedron will consist of in essence, 4 triangles, computeSurfaceArea for the Tetrahedron will compute 4 * the surface area of the Triangle made up of 3 of those 4 Points. Write the Tetrahedron class to handle the difference(s) between a Tetrahedron and the previously defined Triangle. Assume the instance data of Triangle are protected and all methods are public. Also assume that the class Point has a toString method.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 17:10
Can be categorized as popularity, relevancy, and user satisfaction. select one: a. mobile search seo b. ranking factors c. serp d. web analytics
Answers: 1
question
Computers and Technology, 23.06.2019 05:30
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
question
Computers and Technology, 24.06.2019 08:00
Java the manager of a football stadium wants you to write a program that calculates the total ticket sales after each game
Answers: 1
You know the right answer?
Assume a class Triangle has been defined. It has three instance data, Point p1, p2, p3. The class al...
Questions
question
History, 04.12.2020 19:20
question
Health, 04.12.2020 19:20
question
Mathematics, 04.12.2020 19:20
question
Arts, 04.12.2020 19:20
Questions on the website: 13722362