Ramesh Tiwari

Greenhorn
+ Follow
since Jul 03, 2003
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 Ramesh Tiwari

Mike,thank you very much for your reply.
Does your assignment's documentation explicitly say what fields constitute primary key because docs for URLyBird 1.3.3 doesn't say anything like that, uniquesness is solely maintanied based on recno which is like a serial#.
The database that URLyBird uses contains 7 fields:
1)name(Hotel name)
2)location (city where this hotel is located)
3)size (maximum room occupancy)
4)smoking (smoking or non-smoking flag)
5)rate (charge per night for the room)
6)date (day for which this room is booked)
7)owner (customer name or ID who will occupy this room)
Nothing can be ever unique in the above fields even as a combination because a hotel can have multiple identical rooms and a customer can book multiple rooms in the same hotel for the same day.
recno is the only possible primary key,but we don't allow the client to choose recno i.e where he wants to store the record in the DB file, we control it from within the application.
Hence I don't see any scope for DuplicateKeyException.
Please let me know if you need more info.
Thanks
public int create(String [] data) throws DuplicateKeyException;is the method declaration in DBMain interface,here I don't see any possiblity for DuplicateKeyException because recno is the unique key and we don't specify recno when we create a record and we either a new record at the end or reuse a deleted record and when it comes repeating the data, a hotel can have multiple rooms with the same description for a customer.
Any ideas are appreciated.
Thanks
I downloaded URLyBird 1.3.3 two days ago.Currently, I am going through the documentation.
Documentation says we have to set a flag for deleted records marking them as deleted.But, the delete() in DBMain interface says "Deletes a record, making the record number and associated disk storage available for reuse. "
I am confused, do I need to physically delete the record from the file or just mark it as deleted.
Please explain.
Thanks
I passed SCJP today with 93%. The questions were very easy, much easier than what I expected.
I finished the test in 50 mins and reviewed all the questions twice.Great experience!!
Dan's exams are way to tough for the real exam.
My thanks to K&B and all javaranchers.
20 years ago
Thank you very much Marlene.
Why do we need to call wait() and notify in a synchronized context,in other words, why do we need to get the lock of the object to call wait().
Why can't we directly call wait() on an object without locking the object.
Please explain.
Thanks
v reference that is passed into another() is actually a copy of the original reference,if you change the value of this copy,it doesn't change the original reference value in amethod().
The following code prints "Derived.amethod() 99 Derived.amethod()".
How did amethod() of Derived class get called from Base class constructor?
Thanks

class Base
{
int i = 99;
public void amethod()
{
System.out.println("Base.amethod()");
}
Base()
{
amethod();
}
}
public class Derived extends Base
{
int i = -1;
public static void main(String argv[])
{
Base b = new Derived();
System.out.println(b.i);
b.amethod();
}
public void amethod()
{
System.out.println("Derived.amethod()");
}
}