Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Pallavi Chakraborty

Ranch Hand
+ Follow
since Jan 18, 2003
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 Pallavi Chakraborty

Hello everybody,
I have an application which takes the SSN of the user you want to delete.
It goes through the lines and if it finds the SSN it should not write it to a file.

I have thought a lot but I am not getting it right.
Thanks
Pallavi
18 years ago
Hello Gayathri,
It worked when I chenged the code to
while(br.ready()
{
//code
}
Can you guide me towards how we can delete a record.
Thanks
Pallavi
18 years ago
Hello Gaya,
i tried changing the loop from a do-while to a while. I am still getting the error.
May be I am doing something wrong.
Thanks
Pallavi
18 years ago
Hello everybody,
I have an application here which takes the choice from a user and does the necessary processing. I am using text files for this.
The following are the three programs:
1. Employee1.java
2. Employee1App.java
3. Employee2.java
I had a couple of doubts:
1.
Employee1App has the main method. Choice3 takes us to Employee2 file which checks if an employee exists. the program is working but it is also printing the catch part of the try-catch statement even after it has successfully executed the try part.
2.
Is there a way to delete a record ..... just like we have readLine() is there a way tp delete a line.

Thank you very much.
Pallavi




18 years ago
Hello everybody,
I have an application which has two parts. It gets employee data from the user, SSN, firstname, lastname and stores it in a text file.
This data is stored in the format:
SSN: FirstName: LastName.
Then the String Tokenizer needs to get the individual parts of this using the delimiter:.
I am pasting the three files.
1.Employee1 - writes to the file
2.Employee App - calls Employee1
3.Employee2 - reads from file
The reading part using the String Tokenizer is not working. It is directly going to the catch statement.
I will really appreciate it if you can help me with this.




Thanks
Pallavi
18 years ago
Thanks a lot,
Will choose a better topic next time>
Pallavi
18 years ago
Hello everybody,
I have two programs. One gets the first and last name from the user and sends them to a File.
Another program tries to read this first name and
last name from the file.
However, I have seen that nothing is getting written on to the file.
I am pasting the code for the two programs.

Here is the second code

Please help me out.
Pallavi
18 years ago
Hello Jim,
I tried again and this code compiles without error:

What do you think ?
Pallavi
18 years ago
Hello Jim,
I worked on it a little more and came up with this:

However I get these two errors:
C:\Pallavi's\Javah\JCreator LE\MyProjects\Test1\Ex5.7\ThrowEx.java:27: unreported exception java.net.MalformedURLException; must be caught or declared to be thrown
u = new URL(url);
^
C:\Pallavi's\Javah\JCreator LE\MyProjects\Test1\Ex5.7\ThrowEx.java:30: exception MalformedURLException is never thrown in body of corresponding try statement
catch(MalformedURLException e)
^
2 errors
Process completed.
Thanks
Pallavi
18 years ago
Hello Jim,

The if statement is for an unknown protocol.
I tried the follwong code but I am still not clear.

The if part , how do we specify the unknown protocol.
The only thing I could think of is the URL being a null.
I appreciste your patience on this.
Thank you
Pallavi
18 years ago
Hi Jim,
This line is supposed to create an object of class URL and send a string object into its constructor.If the string specifies an unknown protocol, then an exception will be thrown.
I know to catch the Malformed URL exception, it has to reported somewhere. I had tried moving the throw statement to the method urltest and making it a throws statement.
I think I am missing a very simple point.
I just don't know what.
Thanks
Pallavi
18 years ago
Hello Barry,
I tried adding the constructor of java.net.URL
I am pasting the modified code.


However, I get this error:
[CODE}
C:\JCreator LE\MyProjects\Test1\Ex5.7\ThrowEx.java:22: ';' expected
URL u = new URL(url) throw new MalformedURLException("test");
^
[/CODE]
Thank you
Pallavi
18 years ago
Let me try that,
Pallavi
18 years ago
Hello everybody,
I have the following program which catches a MalformedURLException. The value of the string variable URL is initialized to null.
Instead of this, can I get the URL as an input from the user and then check to see if it is in the URL format.
I am not sure how this would be done.
Here is the code
18 years ago
Hi Rene and Mark,
The first time I followed the steps : I got a folder in my directory which had the name - META-INF/MANIFEST.MF
But since then i do not actually get a manifest file.
Can that be the reason.
Thank you
Pallavi
19 years ago