You're quite right. My solution was poor. I've re-read some principles and am starting again. Thanks for you help :)
Type: Posts; User: Alex L
You're quite right. My solution was poor. I've re-read some principles and am starting again. Thanks for you help :)
Changed
private String student;
to
private String student = "";
I'm having a problem with calling arrays from a class. I know I should should separate the user interface from the logic so that's what I've tried to do. If you know of a better way please mention...
Plus this thread was written a few months ago. The OP (me) has already found the solution ;)
Thank you, that works a treat :)
Thank you for pointing that out. I didn't notice it. By changing part of the code to this:
private double volume() {
volume = 1.33333333 * Math.PI * Math.pow(radius(), 3);
return volume;
...
A question (not homework, a question from a book, don't worry) asks me to create a program to work out the volume and surface area of a sphere.
The surface area part works fine, it is the volume...
Thank you for your replies, I have started to go through the links and will give it another go. I'll keep you updated.
Hi, I've left this a bit late really bit I go back to uni in 2 weeks. I got through the first year without really understanding OOP and just avoided the questions. I'm sure I will be stuck next year...