CJCoding With Joseph

Triangle Area Class

Create a class Triangle whose constructor stores a base length and a height, and an Area() method that returns half of base times height. Do not write a Main method.

For a base of 4 and height of 3 the program prints:
6

Expected Output:

6
Topics:
Classes
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.