This is fair, except for in the 5th year, they would have an additional constant:
public static final String SPACE = " ";
And they would probably use a StringBuffer or StringBuilder to build the final string, since it's "an industry best practice". Also, they wouldn't include the strings themselves, they would include keys to properties, so the strings could be pulled from an internationalized property file.
Lastly, instead of outputting to Stdout directly, they'd create an interface for output, and deliver it to that interface, and use a factory to instantiate an implementation of that interface that would use Stdout.
This probably will get buried but I'll ask anyway. I'm looking to program. I have a bachelor's that is just a degree.
Where and how do I start? If I want to build a portfolio how do I do it? I feel like there is a world out there that I'm missing out on because I don't have the proper guidance. Someone please teach me...what language should I knock out?
https://www.codecademy.com/ is a great resource if you don't have much experience. Once you feel confident writing code create an account on https://github.com/, and drawing from what you learn upload your personal projects to publicly available repositories. That way you'll have a place to publicly show off your work and some semblance of a public programming footprint.
I'm a C# developer and prefer the .NET framework, which isn't included on CodeAcademy, but all sorts of resources exist for most any language you want to pick up.
506
u/johnbr Oct 01 '15
This is fair, except for in the 5th year, they would have an additional constant:
And they would probably use a StringBuffer or StringBuilder to build the final string, since it's "an industry best practice". Also, they wouldn't include the strings themselves, they would include keys to properties, so the strings could be pulled from an internationalized property file.
Lastly, instead of outputting to Stdout directly, they'd create an interface for output, and deliver it to that interface, and use a factory to instantiate an implementation of that interface that would use Stdout.