This is supposed to be a class with a demo. The demo gets the circle radius and sends it to the class to do work and return the circumference, area and diameter.
For some reason when I run the program (I get no errors when compiling) I get o's for my awnsers no matter what radius is used. I think its probably something stupid thing I overlooked, and i need a wiser person than I to help me out!
Much appreciated.
My instructions are to write a program that demonstrates the circle class by asking the user for the circles radius creating a circle object and then displaying the circles area, diameter, and circumference.
Well, the demo demonstrates the class by using its methods, It will first ask the user for their radius and then send that to the class to be used in the methods to find the information. the methods return the desired information which you call by calling the object reference and the method name, such as circle.getDiameter.
There ya go!
I know this is probably a dumb question but i want to be sure that I dont need to change anything in the class after switching these right?
Object reference names are for the reader/programmer, not the machine.
Katrina tells me frequently of someone who named their variables a, then aa, then aaa, then aaaa..... et cetera. The computer doesn't care. It will work. But how will you change/fix/debug it?
Being able to pick good reference/variable names is important.
When you do things right, people won't be sure you've done anything at all.