'F' → Fullscreen
public class Program { public static void main(String[] args) { // String Variables System.out.println("- About Me -"); String person = "Anthony"; // Insert your name into the string String food = "Pizza Hut Pepperoni Pizza"; // Replace pizza with your favorite food
System.out.println("Hello, my name is " + person + "!"); System.out.println("I, " + person + ", love to eat " + food + "."); System.out.println();// }}
public class Program { public static void main(String[] args) { // String Variables System.out.println("- About Me -"); String person = "Anthony"; // Insert your name into the string String food = "Pizza Hut Pepperoni Pizza"; // Replace pizza with your favorite food
System.out.println("Hello, my name is " + person + "!"); System.out.println("I, " + person + ", love to eat " + food + "."); System.out.println();
System.out.println("- Tongue Twister -"); String item = "hot dogs"; // Insert a generic item System.out.println("Try saying this five times fast:"); System.out.println("Peter Piper picked a peck of pickled " + item + "."); System.out.println("A peck of pickled " + item + " Peter Piper picked."); System.out.println("If Peter Piper picked a peck of " + item + ","); System.out.println("where's the peck of " + item + " Peter Piper picked?"); System.out.println();// }}
public class Program { public static void main(String[] args) { // String Variables System.out.println("- About Me -"); String person = "Anthony"; // Insert your name into the string String food = "Pizza Hut Pepperoni Pizza"; // Replace pizza with your favorite food
System.out.println("Hello, my name is " + person + "!"); System.out.println("I, " + person + ", love to eat " + food + "."); System.out.println();
System.out.println("- Tongue Twister -"); String item = "hot dogs"; // Insert a generic item System.out.println("Try saying this five times fast:"); System.out.println("Peter Piper picked a peck of pickled " + item + "."); System.out.println("A peck of pickled " + item + " Peter Piper picked."); System.out.println("If Peter Piper picked a peck of " + item + ","); System.out.println("where's the peck of " + item + " Peter Piper picked?"); System.out.println();
// Number Variables System.out.println("- Health Demo -"); int health = 100; int damage = 55; System.out.println("You've taken " + damage + " damage. You have " + (health - damage) + " health left."); System.out.println();// }}
public class Program { public static void main(String[] args) { // String Variables System.out.println("- About Me -"); String person = "Anthony"; // Insert your name into the string String food = "Pizza Hut Pepperoni Pizza"; // Replace pizza with your favorite food
System.out.println("Hello, my name is " + person + "!"); System.out.println("I, " + person + ", love to eat " + food + "."); System.out.println();
System.out.println("- Tongue Twister -"); String item = "hot dogs"; // Insert a generic item System.out.println("Try saying this five times fast:"); System.out.println("Peter Piper picked a peck of pickled " + item + "."); System.out.println("A peck of pickled " + item + " Peter Piper picked."); System.out.println("If Peter Piper picked a peck of " + item + ","); System.out.println("where's the peck of " + item + " Peter Piper picked?"); System.out.println();
// Number Variables System.out.println("- Health Demo -"); int health = 100; int damage = 55; System.out.println("You've taken " + damage + " damage. You have " + (health - damage) + " health left."); System.out.println();
System.out.println("- Age Demo -"); int age = 35; // Assign your age System.out.println("you will reach age 100 in " + (100 - age) + " years."); System.out.println();// }}
public class Program { public static void main(String[] args) { // String Variables System.out.println("- About Me -"); String person = "Anthony"; // Insert your name into the string String food = "Pizza Hut Pepperoni Pizza"; // Replace pizza with your favorite food
System.out.println("Hello, my name is " + person + "!"); System.out.println("I, " + person + ", love to eat " + food + "."); System.out.println();
System.out.println("- Tongue Twister -"); String item = "hot dogs"; // Insert a generic item System.out.println("Try saying this five times fast:"); System.out.println("Peter Piper picked a peck of pickled " + item + "."); System.out.println("A peck of pickled " + item + " Peter Piper picked."); System.out.println("If Peter Piper picked a peck of " + item + ","); System.out.println("where's the peck of " + item + " Peter Piper picked?"); System.out.println();
// Number Variables System.out.println("- Health Demo -"); int health = 100; int damage = 55; System.out.println("You've taken " + damage + " damage. You have " + (health - damage) + " health left."); System.out.println();
System.out.println("- Age Demo -"); int age = 35; // Assign your age System.out.println("you will reach age 100 in " + (100 - age) + " years."); System.out.println();
System.out.println("- Money Demo -"); double balance = 100.25; double withdraw = 45.11; // Replace 0 with a positive number of your choice. double leftover = balance - withdraw; System.out.println("You have a balance of $" + balance + " in your bank account."); System.out.println("If you take out $" + withdraw + ", you will have $" + leftover + " left.");// }}
Your program output should something similar to the sample output below.
- About Me -Hello, my name is Anthony!I, Anthony, love to eat Pizza Hut Pepperoni Pizza.
- Tongue Twister -Try saying this five times fast:Peter Piper picked a peck of pickled hot dogs.A peck of pickled hot dogs Peter Piper picked.If Peter Piper picked a peck of hot dogs,where's the peck of hot dogs Peter Piper picked?
- Health Demo -You've taken 55 damage. You have 45 health left.
- Age Demo -you will reach age 100 in 65 years.
- Money Demo -You have a balance of $100.25 in your bank account.If you take out $45.11, you will have $55.14 left.- About Me -Hello, my name is Anthony!I, Anthony, love to eat Pizza Hut Pepperoni Pizza.
- Tongue Twister -Try saying this five times fast:Peter Piper picked a peck of pickled hot dogs.A peck of pickled hot dogs Peter Piper picked.If Peter Piper picked a peck of hot dogs,where's the peck of hot dogs Peter Piper picked?
- Health Demo -You've taken 55 damage. You have 45 health left.
- Age Demo -you will reach age 100 in 65 years.
- Money Demo -You have a balance of $100.25 in your bank account.If you take out $45.11, you will have $55.14 left.
You may write your reflection answers as comments at the bottom of your code.
Submit your activity and reflection answers to the appropriate dropbox.