• 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
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

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).]
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic