Declare a class (i.e., a type) called CArea and an object (i.e., a variable) of this class called obj. This class contains four members: two data members of type int (member x and member y) with private access and two member functions with public access: set_values() and area(). Calculate the area of the triangle (area = 0.5x y). Display all the values considered for calculating an area and the area itself. Implement the full code with Templates concept and other necessary functions to run it. And all data will be collected from user during run time to calculate as needed
Recommended Answers
Jump to PostIt may be urgent for you but I don't consider doing someone else's homework for them urgent at all.
All 2 Replies
Reverend Jim
3,491
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
Dani
2,416
The Queen of DaniWeb
Administrator
Featured Poster
Premium Member
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.