Brian Walsh

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

Recent posts by Brian Walsh

Hi I am having problems with a program in that I am supposed to be sorting some objects with a general objects sort that I was given, and I am now recieving this compile error:

Here is the Program that I having proplems with.

Here is the Sorts program I am working with.

Here is the program that I pulled that line of code from to create an insertion sort...



I just added that last bit for people to look at so they could compare it. I figured too much info is better than too little. Thanks in advance for your help on the matter.
21 years ago
I was having problems with incompatible types on a string to be read. I want to read a string and each letter be printed on a seperate line...right now I am working on this line....

here is the error when compiling.


A:\Chapter 3\Bench\StringRead.java:22: incompatible types
found : char
required: java.lang.String
place = Character.toLowerCase(sentence.charAt(i));
^
1 error
Tool completed with exit code 1


I understand the basics of objects, but I am still working on how to use the api right. Could anyone point me out to a tutorial that would help me? Thank you very much. Here is the entirety of the program still in progress....


import cs1.Keyboard;
public class StringRead
{

public static void main (String[] args)
{
String num, place, sentence;
int i , letter;
System.out.println ("Please put in a string of letters or a sentence...");
sentence = Keyboard.readString();
for (i = 0; i < sentence.length();++ i)
{
place = Character.toLowerCase(sentence.charAt(i));
}
}
}


Thanks again for your help and time....
-Calv1n
21 years ago
Hi again...
Sorry to bug you guys about the same old program but I am having having problems getting to the methods of Guest.java to do graphic commands. It all comppiled fine but when Diner.java implements
"placeCheck();" & "colorCheck(page);" it does'nt show up in the applet when I run it.
Here is:
Guest.java
Diner.java

THANK YOU SOOOOO MUCH FOR YOUR HELP!!!




I JUST WANTED TO LET YOU GUYS KNOW THAT THIS SITE MAKES ME LEARN THREE TIMES AS FAST, THANK YOU FOR YOUR INPUT.
21 years ago
Thank you that helped very much.....
21 years ago
Hello again,
I was wondering if I could get help with the ColorCheck method I built I think I am having problems with me putting the "Graphics page" between it's parathesis. If I did'nt when I would compile it would'nt recognize page.setColor in Guest.java. But when I would compile my second program it says I can't apply the Graphics page to Colorcheck (). So I don't know what to do....
-Here is the following in this order:
Code for Guest.java (program to set up methods)
Code for Diner.java (program to envoke methods)
Compile error for Diner.java

THANK YOU VERY MUCH FOR YOUR TIME AND HELP




(Marilyn split very long line)
[ July 06, 2002: Message edited by: Marilyn deQueiroz ]
21 years ago
I'm having a problem with this program below it seems to not resovle the "page.fillOval", here is the program. Mind you this is still a work in progress, thank you for your help....

Here is the compile errors:

C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\Guest.java:27: invalid method declaration; return type required
public Guest (String owner, int sex, double spot)
^
C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\Guest.java:12: class RanCirc is public, should be declared in a file named RanCirc.java
public class RanCirc extends Applet
^
C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\Guest.java:39: cannot resolve symbol
symbol : variable page
location: class RanCirc
page.setColor (Color.blue);
^
C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\Guest.java:40: cannot resolve symbol
symbol : variable page
location: class RanCirc
page.fillOval (placeX, placeY, width, width);
^
C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\Guest.java:46: cannot resolve symbol
symbol : variable page
location: class RanCirc
page.setColor (Color.pink);
^
C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\Guest.java:47: cannot resolve symbol
symbol : variable page
location: class RanCirc
page.fillOval (placeX, placeY, width, width);
^
6 errors
Tool completed with exit code 1


thanks again for your help...
21 years ago
Thanks for the help you guys I figured out the problem and I decided to use the switch statement instead, I will definatly use that in the future. THANK AGAIN!!!
21 years ago
I am writing a program that will read a string of letter and then be able to spit out the number of each vowel of that string.Here is the code I have been writing. I am unable to figure out why for the variable place I am unable to make it a variable string, rather than a integer that will compile fine.

I get the compile error

C:\Documents and Settings\Administrator\Desktop\Schoolie\Spring 2002\CS161\Workbench\SayLetter.java:30: incompatible types
found : char
required: java.lang.String
place = Character.toLowerCase(Letters.charAt(spot));//says where to look in string
^
1 error
Tool completed with exit code 1


I wanted to thank you in advance for helpong me because tihs eludes me as to I am very much a beginner. THANK YOU FOR YOUR TIME
21 years ago
thanks for the help....
21 years ago
IS there a Java eqiuvalent for a Goto statement?
like
if (Dots == 8)
Goto 10
21 years ago
I was having a problem with my code, this probably would'nt take long for somebody with more experience...thanks for the help.

here would be the errors to make it easier


THANKS IN ADVANCE
21 years ago
THANK YOU...IT DID
22 years ago
here is the code to make it easier to look at then the original post.
22 years ago