File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Boolean Method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Boolean Method" Watch "Boolean Method" New topic
Author

Boolean Method

Roger Sanchez
Greenhorn

Joined: Jun 23, 2003
Posts: 16
This is a sample exam question that I struggling with:
Write a boolean method named digit that returns true if the value of its char type parameter is a digit (one of "0", "1", ., "9") and returns false otherwise.
Thanks,
Roger
Joe Pluta
Ranch Hand

Joined: Jun 23, 2003
Posts: 1376
Okay, let's see what you've got so far. For example, have you figured out the method signature yet? The method signature includes the name of the method, the type of value returned (if any) and the names and types of the parameters. Have you gotten that far? If so, show us.
Next, can you think what sort of logic you might want to use to do what you need to do? Can you write out in pseudo-code (which is just English) the steps you would take to process this function?
I hope I don't sound pedantic here. What I'm trying to do is walk you through the basic steps of analysis and design, which you need to do before you ever write a line of code.
Joe
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Boolean Method