It's not necessary to use the article "the" in the case you specify.
You would say "Assumption #2 is ..."
If you want to use the definitive article, preface with the ordinal number:
"The second assumption presumes that..."
From Wikipedia:
A definite article indicates that its noun is a particular one (or ones) identifiable to the listener. It may be the same thing that the speaker has already mentioned, or it may be something uniquely specified. The definite article in English is the.
That seems like an interesting question, so I did a bit of research.
The short version of what I found is that headlines have been capitalized as long has there have been newspaper headlines.
Read on for the long version.
Everything Started In All Caps
I started with a quick look at the overall development of capitalization. In latin, the earliest occurrences of lowercase letters come from about AD 79. Before that, everything was essentially written in "uppercase". But of course wasn't standardized until the invention of the printing press.
The First Book Ever Printed Didn't Use Title-Case
The Gutenberg bible (of course the 1st book ever printed) doesn't have too much in the way of "headlines", but the closest thing approximation would be the titles of sections, such as the title for Jermoe's Prologue to the Pentateuch. Lucky for us, the British Library has a couple of its copies digitized and online. In the image below, from the British Library's paper copy of the Gutenberg, you can see that the title (in red) to Jerome's Prologue isn't in title case, and only the "I" in "Incipit" - the first word of the title - is capitalized.
Moving On To Newspapers
The first newspaper ever printed (we'll ignore earlier handwritten newspaper-like things) was "The Relation" from Strasbourg, started in 1605. Also lucky for us, the University of Heidelberg has digital copies available online from the 1609 edition. It didn't have "headlines" in the way we'd think of them in modern newspapers, but instead had something more like a dateline. Here's an example of said dateline, from an October 1609 edition.
My high school German is a bit rusty, but I believe this headline reads, "News from somethingorsomeone/ From 1. October Year 1609"
We can't really conclude whether or not this is a headline in title case, since it's not truly a headline.
If we move all the way up to an early British paper, "The London Gazette" (which has great online archives) from 1665 , we run into the same problem.
In fact, all the way up to the 1800s, "The Gazette" still didn't have anything that could be called a proper headline.
The earliest newspaper I could find online with proper headlines was "The New York Herald" (the publication that sent Stanley in search of Livingstone among other things) from 1840. You can find a digital archive of scanned microfilm online. And all of its headlines are in either title-caps, or all-caps.
For further confirmation, you can see that when the New York Times launched in 1851, it also presented headlines in either title-case, or all-caps.
So, barring contradictory information, I gather that headlines have been capitalized at least as long as newspapers have had them.
Best Answer
As far as Java and Android SDK are concerned, they're proper nouns.
Object-oriented programming is often written as OOP. Perhaps the author of the sentence thought it should be capitalised because the abbreviated form OOP has capitalised letters. The proper way of writing it would be 'object-oriented programming', since it is in the middle of a sentence.
Design patterns should not have capitalised letters - it isn't a proper noun, neither does it have an abbreviation; the author may have capitalised it for emphasis. Or he just isn't familiar with the rules of this language that well!