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, 24.06.2019 13:30
What process should be followed while giving a reference? sam has given a reference of his previous manager in his resume. sam should him in advance that the potential employers will him.
Answers: 1
question
Computers and Technology, 25.06.2019 02:30
On the pie chart below, which β€œslice” represents 30% of the budget?
Answers: 2
question
Computers and Technology, 25.06.2019 09:30
An output peripheral interacts with or sends data to the computer provides information to the user from the computer receives data from the computer and sends it to a modem stores data processed by the computer
Answers: 1
question
Computers and Technology, 25.06.2019 16:30
Do you think social media should affect presidential elections
Answers: 2
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
Mathematics, 16.07.2019 22:40
question
Mathematics, 16.07.2019 22:40
Questions on the website: 13722361