Reorganize repository

This commit is contained in:
2022-09-29 09:47:57 -05:00
parent bb527bf234
commit 729cb2e986
323 changed files with 67 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.calebfontenot.lab4_calebfontenot</groupId>
<artifactId>lab4_CalebFontenot</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>18</maven.compiler.source>
<maven.compiler.target>18</maven.compiler.target>
<exec.mainClass>com.calebfontenot.lab4_calebfontenot.Lab4_CalebFontenot</exec.mainClass>
</properties>
</project>

View File

@@ -0,0 +1,17 @@
/*
* 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 com.calebfontenot.lab4_calebfontenot;
/**
*
* @author caleb
*/
public class ABCD {
public static void main(String[] args)
{
int ABCD = 1234;
System.out.println(ABCD % 100);
}
}

View File

@@ -0,0 +1,18 @@
/*
* 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 com.calebfontenot.lab4_calebfontenot;
/**
*
* @author caleb
*/
public class Debug1 {
public static void main(String[] args)
{
int i = 1;
int j = i * i * i;
System.out.println( j );
}
}

View File

@@ -0,0 +1,19 @@
/*
* 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 com.calebfontenot.lab4_calebfontenot;
/**
*
* @author caleb
*/
public class Debug2 {
public static void main(String[] args)
{
int i = 9;
int j = (int)((5.0 / 6) * (i * 4));
System.out.println(j);
}
}

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 com.calebfontenot.lab4_calebfontenot;
/**
*
* @author caleb
*/
public class Debug3 {
public static void main(String[] args)
{
System.out.println((long)2147483647 + 1);
}
}

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 com.calebfontenot.lab4_calebfontenot;
/**
*
* @author caleb
*/
public class Debug5 {
public static void main(String[] args)
{
System.out.println("1 + 2 is "+ (1 + 2));
}
}

View File

@@ -0,0 +1,34 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
*/
package com.calebfontenot.lab4_calebfontenot;
import java.util.Scanner;
/**
*
* @author caleb
*/
public class Lab4_CalebFontenot {
public static void main(String[] args) {
// Setup Scanner;
Scanner input = new Scanner(System.in);
System.out.println("Enter i, j, x, and y: ");
int i = input.nextInt();
int j = input.nextInt();
double x = input.nextDouble();
double y = input.nextDouble();
//int i = 11,
// j = 22;
//double x = 11.11,
// y = 22.22;
// Changed addition to division
System.out.println("\n" + i + " / " + j + " = " + (i / j));
System.out.println("\n" + x + " / " + y + " = " + (x / y));
}
}

View File

@@ -0,0 +1,64 @@
/*
* 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 com.calebfontenot.lab4_calebfontenot;
import java.text.DecimalFormat;
import java.util.Scanner;
/**
*
* @author caleb
*/
public class payroll {
public static void main(String[] args)
{
// Create Scanner
Scanner input = new Scanner(System.in);
// Define vars
String employeeName;
double hoursWorked;
double hourlyPayRate;
double federalTaxWithholdingRate;
double stateTaxWithholdingRate;
double grossPay;
double federalWithholding;
double stateWithholding;
double totalDeduction;
// Prompt for input
System.out.print("Enter employee's name: ");
employeeName = input.next();
System.out.print("Enter the number of hours worked in a week: ");
hoursWorked = input.nextDouble();
System.out.print("Enter the hourly pay rate: $");
hourlyPayRate = input.nextDouble();
System.out.print("Enter the federal tax witholding rate (as a decimal, please!): ");
federalTaxWithholdingRate = input.nextDouble();
System.out.print("Enter the state tax withholding rate (as a decimal, please!): ");
stateTaxWithholdingRate = input.nextDouble();
System.out.println(""); //empty space
// Setup Decimal fomatting
DecimalFormat df = new DecimalFormat("#0.00");
// Calculate
grossPay = (hoursWorked * hourlyPayRate);
federalWithholding = (grossPay * federalTaxWithholdingRate);
stateWithholding = (grossPay * stateTaxWithholdingRate);
totalDeduction = (grossPay - (federalWithholding + stateWithholding));
// Print output
System.out.println("Employee Name: "+employeeName);
System.out.println("Hours Worked: "+hoursWorked);
System.out.println("Pay Rate: $"+ df.format(hourlyPayRate));
System.out.println("Gross Pay: $"+df.format(grossPay));
System.out.println("Deductions:");
System.out.println("\t"+"Federal Withholding ("+ (federalTaxWithholdingRate * 100.0)+"%):$"+df.format(federalWithholding));
System.out.println("\t"+"State Withholding ("+ (stateTaxWithholdingRate * 100.0)+"%):$"+df.format(stateWithholding));
System.out.println("Total Deduction: $"+df.format(totalDeduction));
}
}

View File

@@ -0,0 +1 @@
com/calebfontenot/lab4_calebfontenot/Lab4_CalebFontenot.class

View File

@@ -0,0 +1 @@
/home/caleb/NetBeansProjects/ADSV Java/lab4_CalebFontenot/src/main/java/com/calebfontenot/lab4_calebfontenot/Lab4_CalebFontenot.java