IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Looking for programming problem ideas - first OO C++ program
For my victims - er class.

It needs to be something a pro could write in an hour. We're talking 1-5 pages of code max. Last assignment introduced streams, structs, and an internally linked list by implementing a phone book that supported add, list, delete, find, save, and load via a command line menu.

Now I want to introduce classes (actually ADT - no inheritance yet) and am coming up dry for ideas.



That was lovely cheese.

     --Wallace, The Wrong Trousers
New Turn the phone book into a mini-CRM app?
...maybe a Customer class which owns an ordered set of Conversation objects.
New How 'bout...
... the underlying data store for a Football Pool (that's American Football for you, Peter). Define a Team class that contains such nonsense as their name, their logo, etc. Then another class for a Game; contains two pointers to the Teams that are playing each other, which one's the home team, which one is favored by how much, etc. Finally a GameWeek class, which is a container for the Games that are to be played in a given week.

No inheretance, but lots of aggregation. Once done, you can then use this store to display a list of the week's Games in HTML or something, using the Game's Render() method, which would call the Team's Render method for rendering the logos....

Might be fun. Note that there should be the standard disclaimer that this is "for educational purposes only...blah, blah, blah...".
jb4
shrub\ufffdbish (Am., from shrub + rubbish, after the derisive name for America's 43 president; 2003) n. 1. a form of nonsensical political doubletalk wherein the speaker attempts to defend the indefensible by lying, obfuscation, or otherwise misstating the facts; GIBBERISH. 2. any of a collection of utterances from America's putative 43rd president. cf. BULLSHIT

New Baseball!
Then you have context-dependence like designated hitter.
-drl
New Source of project ideas
They've been collecting [link|http://nifty.stanford.edu|nifty ideas here] for a while.

Worth poking through....

(BTW, congrats on the new gig! Hope everything works well for you.)

Tom Sinclair

"While I'm still confused and uncertain, it's on a much higher plane, d'you
see, and at least I know I'm bewildered about the really fundamental and
important facts of the universe."
Treatle nodded. "I hadn't looked at it like that," he said, "But you're
absolutely right. He's really pushed back the boundaries of ignorance."
-- Discworld scientists at work
(Terry Pratchett, Equal Rites)
Expand Edited by tjsinclair July 21, 2004, 05:24:03 PM EDT
New Those are kind of cool
I made them write a Fraction object though.

There was much consternation in class to learn that 99/100 == 0. (due to int truncation). So I wrote an Int class that faithfully mimics a builtin int, but operator/ returns a Fraction. They have to write the fraction (retains numerator and denominator). I helped them out by writing the reduce method and ctors.

Good ADT and type management exercise. I gave them a test program that has to work that exercises all sorts of type conversions. They'll be in ambiguity hell for hours I'll bet. Writing a new type is freakin hard (and generally not quite possible in C++ without making some compromises).



That was lovely cheese.

     --Wallace, The Wrong Trousers
New Glad you liked them
I'm always on the look-out for interesting (but doable) programming problems for my students.

Tom Sinclair

"While I'm still confused and uncertain, it's on a much higher plane, d'you
see, and at least I know I'm bewildered about the really fundamental and
important facts of the universe."
Treatle nodded. "I hadn't looked at it like that," he said, "But you're
absolutely right. He's really pushed back the boundaries of ignorance."
-- Discworld scientists at work
(Terry Pratchett, Equal Rites)
New You're welcome to mine
[link|http://carbon.cudenver.edu/~tblancha/csc1410|http://carbon.cudenv...~tblancha/csc1410]

Don't know how long it will stay up there after the summer ends.



That was lovely cheese.

     --Wallace, The Wrong Trousers
New Thanks, I'll snag them right now
Tom Sinclair

"While I'm still confused and uncertain, it's on a much higher plane, d'you
see, and at least I know I'm bewildered about the really fundamental and
important facts of the universe."
Treatle nodded. "I hadn't looked at it like that," he said, "But you're
absolutely right. He's really pushed back the boundaries of ignorance."
-- Discworld scientists at work
(Terry Pratchett, Equal Rites)
New Might wait until class is over on the 7th - more to come



That was lovely cheese.

     --Wallace, The Wrong Trousers
New I remember a book from my days in Russia
[link|http://www.amazon.com/exec/obidos/tg/detail/-/0132918072/qid=1090507342/sr=8-1/ref=sr_8_xs_ap_i1_xgl14/104-8975062-2015963?v=glance&s=books&n=507846|Etudes for Programmers]

It was translated, and the problems were very interesting and quite doable (if I had a computer at my disposal). The Game of Life on infinite field was one of the simpler ones. Self-printing program was quite interesting (I did it in SNOBOL, but I don't know how tro do it in C).

Of course, time and experience have altered my perception. May be the book is not so good, and it's nostalgia spaeking. Still, take a look.
--

"...was poorly, lugubrious and intoxicated."

-- Patrick O'Brian, "Master and Commander"
     Looking for programming problem ideas - first OO C++ program - (tuberculosis) - (10)
         Turn the phone book into a mini-CRM app? - (FuManChu)
         How 'bout... - (jb4) - (1)
             Baseball! - (deSitter)
         Source of project ideas - (tjsinclair) - (6)
             Those are kind of cool - (tuberculosis) - (4)
                 Glad you liked them - (tjsinclair) - (3)
                     You're welcome to mine - (tuberculosis) - (2)
                         Thanks, I'll snag them right now -NT - (tjsinclair) - (1)
                             Might wait until class is over on the 7th - more to come -NT - (tuberculosis)
             I remember a book from my days in Russia - (Arkadiy)

They both savoured the strange warm glow of being much more ignorant than ordinary people, who were only ignorant of ordinary things.
101 ms