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, 23.06.2019 04:40
The narrative structure of the popular movies can be broken down into
Answers: 3
question
Computers and Technology, 24.06.2019 13:00
Why should you evaluate trends when thinking about a career path?
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Write a program that begins by reading in a series of positive integers on a single line of input and then computes and prints the product of those integers. integers are accepted and multiplied until the user enters an integer less than 1. this final number is not part of the product. then, the program prints the product. if the first entered number is negative or 0, the program must print “bad input.” and terminate immediately
Answers: 2
question
Computers and Technology, 24.06.2019 18:30
What is the local portion of the e-mail address below? [email protected] a.) @ b.) biz c.) gumchewer d.) twrigley
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
Mathematics, 23.04.2020 15:46
question
Mathematics, 23.04.2020 15:46
Questions on the website: 13722363