Search⌘ K
AI Features

Exercise 1: Calculating Area

Explore how to define a Triangle class with public data members for length and height, and implement a member function that calculates the area. This exercise helps you understand class construction, member initialization, and function definition in C++.

Problem statement

Write a class Triangle ...