lab10 go brrr

This commit is contained in:
2022-10-06 09:41:43 -05:00
parent 7d14b1b962
commit f298dfd268
21 changed files with 2159 additions and 13 deletions

View File

@@ -0,0 +1,16 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package lab10_calebfontenot;
/**
*
* @author caleb
*/
public class IndependanceUSA {
public static void main(String[] args)
{
}
}

View File

@@ -0,0 +1,33 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package lab10_calebfontenot;
import java.util.Scanner;
/**
*
* @author caleb
*/
public class ReadWriteCapsOrSmallLetters {
public static void main(String[] args)
{
// Declare variables
String line;
// Setup scanner
Scanner input = new Scanner(System.in);
// Prompt for input
System.out.println("Please enter 5 words on one line seperated by whitespace: ");
line = input.nextLine();
System.out.println("The line you entered: "+ line);
System.out.println("The line you entered in all caps: " + line.toUpperCase());
}
}

View File

@@ -0,0 +1,24 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package lab10_calebfontenot;
import java.util.Scanner;
/**
*
* @author caleb
*/
public class ReadWriteName1 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.print("Please enter your first name followed by your last name \nbeing seperated" +
" from each other by whitespace or carriage return: ");
String firstName = scan.next();
String lastName = scan.next();
System.out.println("\nHello " + firstName + " " + lastName + "!");
}
}

View File

@@ -0,0 +1,30 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package lab10_calebfontenot;
import java.util.Scanner;
/**
*
* @author caleb
*/
public class ReadWriteName2 {
public static void main(String[] args)
{
// Create scanner
Scanner input = new Scanner(System.in);
// Setup variables
String firstName, lastName;
// Prompt for input
System.out.println("Please enter your first name, followed by your last name: ");
firstName = input.next();
lastName = input.next();
//Print output
System.out.println("Hello, " + firstName + ", " + lastName + ".");
}
}

View File

@@ -0,0 +1,24 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package lab10_calebfontenot;
import java.util.Scanner;
/**
*
* @author caleb
*/
public class ReadWriteName3 {
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.print("Please enter your first name followed by your last name \nbeing seperated "
+ "from each other by whitespace: ");
String wholeLine = scan.nextLine();
System.out.println("\nHello " + wholeLine + "!");
}
}