/** * CS149 - Programming Fundamentals * Department of Computer Science * James Madison University * @version Fall 2019 */
Write a program named HelloWorld.java that displays
the message Hello, World!
exactly as shown. The point of
this exercise is to set up
your development
environment and become familiar
with Autolab. To get full
credit, your submission must also pass
our Checkstyle rules.
Write a program named FightSong.java that prints the JMU Fight Song lyrics:
Madison, James Madison, We are the Dukes of JMU Madison, James Madison, The fighting Dukes of JMU Fight for Glory-- Honors Won Brighten the Lights of Madison Madison, James Madison, Show your Colors Proud and True We are the Dukes of JMU
Each line should be a separate println statement in the code. Your output must match the above text exactly, character for character.
Write a program named HarryPotter.java that outputs the following quote from Harry Potter and the Chamber of Secrets:
"It is our choices, Harry, that show what we truly are, far more than our abilities." - Albus Dumbledore
The whitespace before the hyphen must be a single tab character. (Notice that most environments, including web browsers, display tabs as eight spaces.) Use appropriate escape sequences so that the output matches exactly.
Write a program named Flower.java that draws the following ASCII art exactly as shown. Notice that each line begins with a space, and there are no extra spaces at the end of each line.
/\ \ \/ / / | \ | ------ / \ | | \ / ------
Write a program named FamousQuotes.java that displays the Top 10 James Madison Quotes using this format:
Top 10 James Madison Quotes (according to brainyquote.com) ---------------------------------------------------------- [10] The essence of Government is power; and power, lodged as it must be in human hands, will ever be liable to abuse. [9] The truth is that all men having power ought to be mistrusted. [8] The advancement and diffusion of knowledge is the only guardian of true liberty. [7] What is government itself but the greatest of all reflections on human nature? [6] The people are the only legitimate fountain of power, and it is from them that the constitutional charter, under which the several branches of government hold their power, is derived. [5] America was indebted to immigration for her settlement and prosperity. That part of America which had encouraged them most had advanced most rapidly in population, agriculture and the arts. [4] Knowledge will forever govern ignorance; and a people who mean to be their own governors must arm themselves with the power which knowledge gives. [3] Liberty may be endangered by the abuse of liberty, but also by the abuse of power. [2] The happy Union of these States is a wonder; their Constitution a miracle; their example the hope of Liberty throughout the world. [1] If men were angels, no government would be necessary.
Note that each quote ends with a newline character, and there are no line breaks in the middle of a quote. The point of this exercise is to learn how to format your source code without exceeding 80 characters per line. Pay attention to the Checkstyle output! Autolab won't take off points if you have lines that exceed 80 characters, but I will remove points manually during grading.
Your solution must NOT use the + operator. For this exercise, Autolab will reject submissions that have a "+" character anywhere in the file.