Hi!
I'm in very early stages of OOP. Coming from a procedural programming, I'm starting to see the change in mindset when designing my application.
My first project:
Convert numbers, date, time values in different languages. Language is not known until run time.
This is how I designed my classes.
Interface ILang. With methods num_to_words(), date_to_words(), time_to_words().
And above interface implemented by these classes: French. English. Spanish. German...
I'm not comfortable about this design. Maybe I should have a class Number, or Date, or Time?
How would you design your classes? Which pattern works best with this scenario?
Thank you!
I'm in very early stages of OOP. Coming from a procedural programming, I'm starting to see the change in mindset when designing my application.
My first project:
Convert numbers, date, time values in different languages. Language is not known until run time.
This is how I designed my classes.
Interface ILang. With methods num_to_words(), date_to_words(), time_to_words().
And above interface implemented by these classes: French. English. Spanish. German...
I'm not comfortable about this design. Maybe I should have a class Number, or Date, or Time?
How would you design your classes? Which pattern works best with this scenario?
Thank you!