This week's book giveaway is in the Programmer Certification forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 21 Developer Study Guide: Exam 1Z0-830 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Say(b) help needed...

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay, I've been thinking about this and trying things for quite awhile and I'm getting no where. I just finished Say(a) and the following is a list of assumptions I'm making concerning version b of the Say assignment.
1.] Since I have the program working with numbers from 0-99, maybe I should try to make it work first with 0-999?
2.] Or maybe I should take the main method which works with 0-99 and turn it into a second method which the main method then calls?
3.] Or I start all over using array containers and read in a string of from 1-3 characters and then manipulate these?
I need a smilie for :frustrated: as I am totally confused.

 
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ed, I like your second choice. Take the stuff you did in main on Say.a and make that a method. Then call that method when needed. Try to look for the pattern. I don't think you have to do just 999 first, but it may help.
Bill
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Part of the reason for doing 0-99 first is so you can use it when you go to 0-999,999,999,999. Your third option is definitely not the way to go. Option #2 is reasonable as is option #1. There are many approaches. It's part of the learning curve to figure out how you want to approach the problem.

 
Ed Byrnes
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey! Thanks Bill and Marilyn...I've completed options 1.] and 2.] so I'm moving along again.
 
tumbleweed
Posts: 5089
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think that's where I go wrong so often. I see the final problem only and start of programming that. I up to now I have not submitted the a part of an assigment as a separate attempt. From this discussion I can see why it makes sense to do that.
JdJ
AND PSE dont make me submit the A's for the one's I already did

[This message has been edited by Johannes de Jong (edited March 15, 2001).]
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic