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.5*x * 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.

Recommended Answers

All 3 Replies

good luck :)

On agreement, I will provide you my bank account number. After deposit of 100000$, I will immediatley give you what you asked for.
On the other end, you could show some effort(which you should!), and show us your code and what precisely you're having trouble with. We will help you out for free. :)

You really do need to show us what you have tried so that we may see where you are having difficulty.

There are exceeding many 'C++ class' example programs all over the WEB ... that could give you good ideas about how to get started.

For a recent example of a 'beginning student level' ... 'C++ class' program ... here at Dani's awesome student help place ... you may like to see this:

https://www.daniweb.com/software-development/cpp/threads/498056/class-and-objects

But do send in the code you have tried so far ... you may be amazed at all the helps freely given here ... after you make your best effort to start!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.