I've been struggling a heck of a lot with this bug I just don't know how to fix.
I've got two classes, one inheriting from the other. I pass parameters from the main function, radius, into the class' variable newRadius, and then return the area of a circle from a class which inherits the newRadius variable and calculates a variable called area as well included in the parent class.
There's nothing wrong for me, a beginner programmer.
There are a few reasons why what you are trying to do won't work. Why don't you just put the computeArea() function in the adquireData class? That would make everything much easier. Then, your main() would work like you want it to.
Like I said, there is more than just one problem with your code. Perhaps I can help, or perhaps not; I will try. Inheritances is somewhat complicated, especially for beginners. I do not know your level or your understanding, so I have to make assumptions. Forgive me if I get those assumptions wrong.
Now, I assume your skill level is low as is your understanding. So, I'll do my best to help you with your code. If you want more let me know.
You declare an adquiredData Get. Then you call Get.setNewRadius(radius);. This works fine. In your class adquiredData, you have a function called setNewRadius.
Then, you try to use Get to "get" the area with Get.getArea(); The problem is that adquiredData class has no method getArea(). There is no link between your adquiredData class and your computeData class.
Furthermore, there is no easy way to link your two classes, which is why I asked for clarification as to what you are "supposed" to do. I can show you inheritance examples, but I'm not sure it will help you with your problem.
@ne555, you're right, but that's not the root of problem here. The problem is that the area is never updated, like you said, between the two classes. There is no inheritance used here.
@Suppresed, this is probably a terrible example, but it does what you want. Please forgive me, I've been drinking.
Yes, i put return (radius * radius) * 3.14; to my original code it worked too so the problem is somewhere in between computing area and using newRadius