Reorganize repository
This commit is contained in:
14
Assignments/03_Sep13_2022/pom.xml
Normal file
14
Assignments/03_Sep13_2022/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._sep13_2022</groupId>
|
||||
<artifactId>03_Sep13_2022</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._sep13_2022.App</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/Project/Maven2/JavaApp/src/main/java/${packagePath}/${mainClassName}.java to edit this template
|
||||
*/
|
||||
|
||||
package com.calebfontenot._sep13_2022;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author caleb
|
||||
*/
|
||||
import java.util.Scanner;
|
||||
|
||||
public class LeapYear {
|
||||
public static void main(String[] args) {
|
||||
// Create a Scanner
|
||||
Scanner input = new Scanner(System.in);
|
||||
System.out.print("Enter a year: ");
|
||||
int year = input.nextInt();
|
||||
|
||||
// Check if the year is a leap year
|
||||
boolean isLeapYear =
|
||||
(year % 4 == 0 && year % 100 != 0) || (year % 400 == 0);
|
||||
|
||||
// Display the result in a message dialog box
|
||||
System.out.println(year + " is a leap year? " + isLeapYear);
|
||||
}
|
||||
}
|
Binary file not shown.
@@ -0,0 +1 @@
|
||||
com/calebfontenot/_sep13_2022/LeapYear.class
|
@@ -0,0 +1 @@
|
||||
/home/caleb/NetBeansProjects/ADSV Java/03_Sep13_2022/src/main/java/com/calebfontenot/_sep13_2022/LeapYear.java
|
Reference in New Issue
Block a user