aspose file tools*
The moose likes Cattle Drive and the fly likes NaturalLanguageMultiply extends Say ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "NaturalLanguageMultiply extends Say ?" Watch "NaturalLanguageMultiply extends Say ?" New topic
Author

NaturalLanguageMultiply extends Say ?

Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
am i the only one that has tried this? ever since i wrote NaturalLanguageMultiply i have been wondering how easy it would be to make it extend my Say (4b) class so i could have the output in "natural language" as well...
it just so happens that the first method in my Say class takes a String as an argument... so, i made my NatualLanguageMultiply extend Say and then i just called the method with my multiplied value (converted to a String)!
anyway, i am just wondering if i am the only person who has tried this... (i hope not, that would mean i am obsessed )


what?
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
As far as I'm concerned you are obsessed
To be honest though my son did suggest that I let NaturalLanguageMultiply say its result but I was just to damm lazy.
Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
haha... so i am thinking like your son. i don't know what to say to that.
actually, this could be a good introductory program for the OO school...
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1746
    
    2
A fun thing to write would be the "if this is tea, bring me coffee; if this is coffee, bring me tea" version.
For example, pass in "17" and get "seventeen" as the result. Pass in "seventeen" and get "17" as the result.
If you're writing this as some number conversion library class, I'm sure you'd want different methods based on which direction you're converting. But if you're doing it as an exercise, it might be fun to let the program figure out whether the input is text or a figure.
Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
great, i thought i was going to stay away from programming this weekend... now i have to write this! thanks, michael.
Michael Matola
whippersnapper
Ranch Hand

Joined: Mar 25, 2001
Posts: 1746
    
    2
In case you're looking for other things to work on...
Nobody's posted a response to my "challenge" regarding adding new validation functionality to the assignment log automation prototype.
Richard Boren
Ranch Hand

Joined: Mar 01, 2001
Posts: 233
You are obsessed . But, what a way of looking at the assignment.
Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
michael, i have an idea for the color part... i modified a bulletin board servlet a couple weeks ago so the font changes based on the username. it would be really easy to implement that based on the days since last submission. making it change the background vs. the text font is a no brainer.
[This message has been edited by Greg Harris (edited August 15, 2001).]
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
Originally posted by Michael Matola:
In case you're looking for other things to work on...
Nobody's posted a response to my "challenge" regarding adding new validation functionality to the assignment log automation prototype.


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NaturalLanguageMultiply extends Say ?