Elouise Kivineva

Ranch Hand
+ Follow
since Feb 07, 2002
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Elouise Kivineva

I need to refresh my java memory (14+ yrs away) and thought that finishing the Cattle Drive would be a brilliant way to do it.

I have a Windows PC but in winter I prefer the iMac because it is in a significantly warmer location (winter in Finland).
I'm not an experienced iMac person, so I can't so easily get the iMac to do what I wish.

Question is:
How difficult is it to get the JRE, SQL, Tomcat to work as desired (as used on the Cattle Drive) using an iMac? Should I take the more familar Windows PC in the 18C room with freezing floors or go ahead and use the upstairs iMac where I'd have toasty toes?
4 years ago
Why don't you capitalize the first letter and then read through the string and each time you find a blank space, capitolize the NEXT letter
19 years ago
What you compile is a java file (*.java). Compiling it creates a class file (*.class). If extra class files are created you must have had inner classes and for these class files are also created.
19 years ago
Start with the square root of your given number.
If division of the int by each and every number from the square root of "int" to 2 always leaves a remainder, then you have a prime number.
19 years ago
Tell me more about what this program is supposed to do:
Are you going to give it other phrases to remove from other
strings, or will you always be removing the words "on the moon"
from all input or what?
19 years ago

I think you also need to add parentheses
to add n to age before you return anything.
(age + n )
19 years ago
You want to compare the first and last chars in a string of length 2 or more and the string being evaluated is a smaller and smaller bit centered around the middle of the original string.

I would create a method that takes a string as a parameter and returns a boolean. Don't need anything more than String-class methods.
19 years ago
If you want to use an Array object you need to import the java.lang.reflect.Array class.

Why all this fancy stuff? Wouldn't an array work just as well?
19 years ago
I think it's been at least 3 years since Microsoft has put any development effort into Visual J++. They went on to C# and .NET.

If you're going to use Java, use the real thing for all its benefits. If you're going to use the MFC, use one of their major products so you can take advantage of all the features and support offered for "real" products.
19 years ago
Is your variable named "sequence" a string?
19 years ago
first of all, make your posted code more readable by using
"code" and "/code" (replace my double quote marks w/ square brackets)
markers to get the proper formatting.

First problem I see in your code is that you initialize grade as 0 and never read into it (from input) any other value.
When you read a grade, you count that as one more student. You never actually record the grade itself.

Create a test input of about 4 grades.
Now write down the names of all your variables on a sheet of scratch paper. These are column headers.
Run through your program using the test input and write down under each
variable (in its column) the values that variable takes on as you run through the program. If it helps you can write down the changes taking place row by row (number the rows in your code and below your columns - graph papaer is good for this).

Are things working the way you planned?
[ November 20, 2004: Message edited by: Elouise Kivineva ]
19 years ago
Good books are described and rated at the Bunkhouse area of Javaranch.

My personal favorite was Deitel & Deitel, read the whole thing cover to cover and a few chapters several times over. Good website too.
19 years ago

replace would be dangerous though. if you change 'A' to 'G' you now have to change the original 'G' to 'A'. you would end up with only 2 of the original 4 variables.

By changing 'A' s and 'G's I mean that the 'A' in string1 are replaced by 'T's in string 2 and the 'G's in string 1 are replaced by 'C's in string 2.
19 years ago
If you create the references inside the loop you will not have them outside the loop.

You could create the references earlier and instantiate them (use the "new" keyword) inside a loop.
19 years ago
I would create a string and use the replace method to change the 'A' and 'G's. String substring methods would also be useful here.

You can always convert from a string to a char array and back again.
19 years ago