Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

garnerd643/Java-Assignment-001

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-Assignment-001

Assignment 1 Playing with printing.

Part 1 - AlanTuring.java

The line "// Write your program here" is a single line comment, and the Java compiler will ignore it.

  • Add your code below the comment that prints the string "Alan Turing" and run the program.

The output of the program should be:

Alan Turing

Part 2 - InAGalaxyFarFarAway.java

  • Modify the program so that it will print the following text:
A long time ago
in a galaxy far,
far away....
  • Use three System.out.println-commands for printing.
    • type sout and use Tab Complete in IntelliJ to save your fingers typing!
    • Remember ; is a line separator so technically your sout statements can be on 1 line!

Part 3 - JurassicPark.java

  • Edit JurrassicPark.java so that it will print the following text (multiple lines) using only 1 print statement:
"Life, uh,
finds a way."
—Ian Malcolm
  • "sout" -shorthand will still save you typing.
  • Escape sequences and multi-line strings ("""String""") are OK

Part 4 - Javadoc

  • Go back and add the following multi-line Javadoc comment above each of your class definitions in all 3 .java files.
  • Keep multiple authors.
/**
*
* @author Trevor Hartman
* @author <REPLACE with YOUR NAME>
*
* @since Version 1.0
*
*/

About

Playing with printing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.