Lou Bassett

Greenhorn
+ Follow
since Nov 08, 2004
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 Lou Bassett

No Problem.

I work for Syndicated Office Systems (IS group for Tenet Healthcare) in Anaheim Ca. They're not looking right now - hence my being thrown into the lion's den. I think they'll open it up in 2005 if the user community yells loud enough for more Java-type stuff. I also have many contact names/head-hunters (the good one's) for when you you start looking (Southern Cal).
16 years ago
Layne,

I've been an AS/400 programmer for over 20 years. If it can be done on the iSeries, I can do. Management basically told me to drop everything, learn Java, write and maintain existing code in production. The two Java programmers/contractors here left - without giving notice - and now I'm responsible. Its not a homework assignment, it's real life, real time and real money.

Yes, I read what you wrote. What I didn't quickly pick up on was the use additional validation of the "H" vs "h" in the format. Now I do. The following is what I coded. Once again, thank you for your assistance. It was greatly appreciated.



16 years ago


I need help with this. Any help would be greatly appreciated.

Thanks
16 years ago
Thanks everyone.

Could someone provide some code that would accept an string()and validate:

1. In hh.mm.ss format and
2. A real time.

Ideally, the method would return boolean.

Thanks for all your help.
16 years ago
Thanks for the tip.

I looked at Regular Expressions, specifically the regex.api. It appears that it can reckonize a specific pattern but it would fall short on validation. For example.. 34:99.12 (Pattern is OK, but invalid time)
16 years ago
I am researching the best/easiest way to validate if a string contains a valid TIME (ie. hh.mm.ss) Some people have suggested that I add a date to it and use some of the DATE(), or Calandar() classes to extract the time, but I don't see this an effective method. I'm looking for something that would act like "String.isTime(testString)" if it existed for example. Since this string will be used to set an instance variable, I have to be certain it's a valid time.

Any help would be greatly appreciated.
16 years ago
A FOR loop has an iterator variable- something that gets incremented each time through the loop (ie. 1,2,3 ...). Think about using it in the body of the code to help you out.
16 years ago
As far as textbooks are concerned, try the "Head First" series by Bert Bates and Kathy Sierra.
16 years ago
When you are designing a class, you are designing what it can know and what it can do. What it knows are called instance variables. Good practice is to declared them as private because you only want the class to know what the values are.



A constructor is a method with the same name as the class (ie. MyClass) that is invoked when you create an object of type "MyClass". Sort of an initialization routine. This would happen when you issued the following:



From here you only want access to name through a public method, and not directly to the object. If the constructor took a parameter then you could initialize the instance variable to what ever you passed in.

[ November 12, 2004: Message edited by: Lou Bassett ]
[ November 12, 2004: Message edited by: Lou Bassett ]
16 years ago
The reason a=2 the first time is because when you create the object ("new") you by default call the constructor. Variables inside the constructor live only for the life of the constructor, then they go bye-bye. Also, the variable "a" in the constructor is not the same as the the instance variable "a". A lot of people use "_a" for instance variable names.

When you passed the number (2), you passed it into the constructor and it set it to "2".

When you did "ob2 = ob1.incrByTen();" the value of ob1.a was already 2, so you added 10 to it and it made it 12. Get it?
16 years ago
I would appreciate a sample. thanks
16 years ago
Wow, thanks for the quick response!

The userspace is 16MB and could hold alot of users @/277 bytes each. My main confusion is what's the difference between an array and a collection? I want to load a dynamic number of service people (it can change second to second), differentiate which supervisor they report to and accumulate group and individual stats. Do I need to load an array with everyone and use the collection class' methods on it?

Thanks
16 years ago
I heard this forum was an great site for beginners as myself, thank you in advance for anyone who helps out.

I have recently migrated from 20 years of as400/RPGIV/ILE programming to Java. One project involves displaying real-time attributes of service-type people stored on the AS/400 in a *USRSPC(UserSpace). When a user signs on, they get a 277-byte chuck of that space. In the AS/400 world, the entire *USRSPC is overlaid into a "multiple occurance data structure"(array) so that each element of the array is a service person and the data on them is automatically mapped into the data structure.

It made sense to me to use the same approach in Java, however, may sources have advised me to use a "Collection" instead. I've looked at the documentation and it is confusing.

I need a simple example or a link to the same.

Sorry for the lengthy message but, I wanted to be specific.

Thanks
16 years ago