Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Beginning Java 2
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Java 2
This is the forum to discuss the Wrox book Beginning Java 2, SDK 1.4 Edition by Ivor Horton; ISBN: 9780764543654
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Java 2 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 12th, 2003, 05:09 PM
Authorized User
Join Date: Aug 2003
Location: Lima, Ohio, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to endamist Send a message via Yahoo to endamist
Default Capital Letters no Vowels.

I'm still beating my head against the wall on this program exercise at the end of chapter 3. excercise 4. wrtie a program that generates a random sequesnce of capital letters that does not include vowels.

I've tried several diffrent ways of writing this program, even tried to re-write the examples that involved letterchecking from the book. Has anyone else tried this one successfully? maybe I'm just missing something or over looking something because I'm trying to hard or because I've been at it to long today, so for now I'm gonna leave it be and come back to it later and if I still don't get it perhaps someone else will post something here that will help me see what Im missing.


  #2 (permalink)  
Old August 12th, 2003, 05:59 PM
Authorized User
Join Date: Aug 2003
Location: Lima, Ohio, USA.
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to endamist Send a message via Yahoo to endamist

Grrr. I knew the minute I posted this topic I would end up figuring out what I was over looking. I wrote the program with a do while loop and kept getting an infinte loop and couldn't figure out why. the problem was what I was testing to be true. I tested for if the symbol was lowercase if this was true the loop would continue, I also tested for specific vowels, symbols lower than A or greater than Z and symbols lower than a or greater than z. It was the test for lower than a or greater than z that was not needed in the program because capital letters would either be lower than lower case letters or greater than and this was creating a situation that would continuously be true and thus the loop would never end. Once I took that test out of the program I had no problem getting it to produce a single capital letter that did not include vowels.

Now all I have to do is get it to produce a sequence of capital letters that do not include vowels which should be easyer now that I've got the basic part of the program to do what I wanted it to do.

Figures that it was something simple I was overlooking... it always is with programs... something simple.



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latin letters itHighway Classic ASP Professional 3 July 20th, 2006 12:14 AM
Remove letters from numbers Corey Access 7 December 18th, 2005 09:09 PM
Capital Letters in a COMBOBOX. How can i do it? thomaz C# 2 October 17th, 2003 11:47 PM
Help with letters ittorget Classic ASP Basics 3 October 14th, 2003 01:11 PM

All times are GMT -4. The time now is 08:57 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.