new semester, new repo structure
This commit is contained in:
14
Semester 1/Assignments/Lab4_1/pom.xml
Normal file
14
Semester 1/Assignments/Lab4_1/pom.xml
Normal 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_1</groupId>
|
||||
<artifactId>Lab4_1</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_1.Lab4_1</exec.mainClass>
|
||||
</properties>
|
||||
</project>
|
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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_1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
import java.util.Scanner;
|
||||
|
||||
public class DisplayTime {
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
Scanner input = new Scanner(System.in);
|
||||
// Prompt the user for input
|
||||
System.out.print("Enter an integer for seconds: ");
|
||||
int seconds = input.nextInt();
|
||||
|
||||
int minutes = seconds / 60; // Find minutes in seconds
|
||||
int remainingSeconds = seconds % 60; // Seconds remaining
|
||||
System.out.println(seconds + " seconds is " + minutes
|
||||
+ " minutes and " + remainingSeconds + " seconds");
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* 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_1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
public class Lab4_1 {
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello World!");
|
||||
}
|
||||
}
|
@@ -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 com.calebfontenot.lab4_1;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
import java.util.Scanner;
|
||||
|
||||
public class SalesTax {
|
||||
public static void main(String[] args) {
|
||||
Scanner input = new Scanner(System.in);
|
||||
|
||||
System.out.print("Enter purchase amount: ");
|
||||
double purchaseAmount = input.nextDouble();
|
||||
|
||||
double tax = purchaseAmount * 0.06;
|
||||
System.out.println("Sales tax is " + (int)(tax * 100) / 100.0);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user