Skip to content

jfreedman340/Java-Assignment-001

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 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

Changing the code to print the right strings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%