Learning Object-Oriented paradigm course

Long time ago it came to me a C code of an application called CommandLine that it had to be translated to Java. The purpose of this exercise was to see that in Java you can code without using Object-Oriented programming, so people can realize that they should understand what is Object-Oriented programming and not calling everything Object-Oriented just because they use classes. I lost the requirements sheet, so I cannot tell exactly what was in there, though the code is simple in requirements (and messy in the original implementation).

This is the code that was translated from C to Java without using OO. I called it Under-engineering: https://mega.co.nz/#!EAA0AA4K!s01950d-vpXc10WEehVc6ior-AFwJ3sXBzUQT-Ds3pU

I called it under engineering because later on we built up the opposite code, the Over-engineered version. Many of you will find easy to realize about the bad things in both codes. This does not happen with first learners. They are not used to structural or functional programming and they start learning object-oriented from the beginning. It is more difficult then to realize what is what. For that reason this course was created.

This is the code of the over-engineered application: https://mega.co.nz/#!lE5W2KBC!F8YlYM6X1_WquymNesBE2US5jRjP4qSjJIi7yHKHVig

Recently, I collaborated in a class to help people understand when they over-engineered or under-engineered. I created a code from the two previous old versions to try to find a good spot where design and simplicity are present. Here is the code: https://mega.co.nz/#!VMwniRzI!vRxFe1dhgkAHD7Uy8k7cBXfBnRNiEOgC6FeO-mx6Jfw

Since I lost the requirement sheet and I made it in a couple of hours it may not be perfect, but it helps people to realize when they think too much in future or too less. Feel free to use or modify these codes. They are for educational purposes so if you find better approaches or you have comments on it, let me know!

I created a Word in which I explain my process of thinking so other people can see why I do or think how I think. Here is the word file: https://mega.co.nz/#!4N4hTKpa!xUkOZb7-d5kCwb0q-5Iv6GA7BXS0F33SM9rnEWUPm0A

Of course, I am no God in here, but definitely with these codes we could encourage people to think and discuss if it is wrong or not and how to improve it.

Also, I recommended the Chapter of Refactoring in the book http://proquest.safaribooksonline.com/book/software-engineering-and-development/software-testing/9781783283293/1dot-getting-familiar-with-tdd/ch01_html#X2ludGVybmFsX0h0bWxWaWV3P3htbGlkPTk3ODE3ODMyODMyOTMlMkZjaDAybHZsMXNlYzEzX2h0bWwmcXVlcnk9


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: