# Hi there

• 03-07-2011, 07:48 PM
JavaWolf
Hi there
hi there,

my name is Java Wolf and I love IT and programming.

I am a scholar and am in my first year of IT.

I have a test on Wednesday and i have no idea how to go about it.

I need to be able to:

1.) Be able to write a program that asks a person to enter their data for the area of a standard(4m squared) tile and by how much longer the person wants it(this being 1 m). The program must find the sqrt of 4 (which is 2) and then adds 1 meter to that. it must be rounded to the nearest integer. It must then be shown in a JOptionPane and must use the /n and /t to space it out nicely.

^ I have absolutely no idea how to do the above.

2.) I have to write a program that outputs only the middle letter of a word. It needs to use length() and the "div" and charAt method.

Can anyone help. I'm so scared that I am going to fail. And I love IT so i don't want that to happen. I just don't understand, is all.

Thanks again,
JavaWolf
• 03-07-2011, 11:17 PM
Fubarable
Quote:

Originally Posted by JavaWolf
I need to be able to:

1.) Be able to write a program that asks a person to enter their data for the area of a standard(4m squared) tile and by how much longer the person wants it(this being 1 m). The program must find the sqrt of 4 (which is 2) and then adds 1 meter to that. it must be rounded to the nearest integer. It must then be shown in a JOptionPane and must use the /n and /t to space it out nicely.

^ I have absolutely no idea how to do the above.

You need to break this down into its constituent steps and then try to solve the small steps one at a time. You'll be surprised at how much you'll probably be able to do. Then if you get stuck at an individual step, come back and we can help. If I'm wrong and you're totally lost, then you need more help than we can give in the forum and you absolutely must speak with your instructor.

Quote:

2.) I have to write a program that outputs only the middle letter of a word. It needs to use length() and the "div" and charAt method.
Again, break it down, again, if you get stuck at a specific point, ask a specific question, again, if totally lost, discuss with your instructor.

Don't give up.