diff --git a/MP2_CalebFontenot.zip b/MP2_CalebFontenot.zip
index c2f58d0..dab3b75 100644
Binary files a/MP2_CalebFontenot.zip and b/MP2_CalebFontenot.zip differ
diff --git a/MP2_CalebFontenot/CheckIBSN_10.html b/MP2_CalebFontenot/CheckIBSN_10.html
index fe94df3..5d1372f 100644
--- a/MP2_CalebFontenot/CheckIBSN_10.html
+++ b/MP2_CalebFontenot/CheckIBSN_10.html
@@ -5,23 +5,27 @@
-/home/caleb/ASDV-Java/MP2_CalebFontenot/src/main/java/com/calebfontenot/mp2_calebfontenot/CheckIBSN_10.java |
+/home/caleb/NetBeansProjects/ADSV Java/MP2_CalebFontenot/src/main/java/com/calebfontenot/mp2_calebfontenot/CheckIBSN_10.java |
-
-
+nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
+nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.mp2_calebfontenot;
@@ -29,19 +33,18 @@ table {color: #888888; background-color: #313335; font-family: monospace; font-w
-
+@author
public class CheckIBSN_10 {
- public static void main(String[] args)
+ public static void main(String[] args)
{
- Scanner input = new Scanner(System.in);
+ Scanner input = new Scanner(System.in);
int digit1, digit2, digit3, digit4, digit5, digit6, digit7, digit8, digit9, inputISBN, outputISBN;
- boolean debug = false;
-
+ boolean debug = true;
- System.out.print("Enter the first 9 digits of an ISBN as an integer: ");
+ System.out.print("Enter the first 9 digits of an ISBN as an integer: ");
inputISBN = input.nextInt();
@@ -59,21 +62,20 @@ table {color: #888888; background-color: #313335; font-family: monospace; font-w
if (debug == true)
{
- System.out.println("inputISBN: " + inputISBN);
- System.out.println("ISBN split into 9 digits: " + (digit1) + " " + (digit2) + " " + (digit3) + " " + (digit4) + " " + (digit5) + " " + (digit6) + " " + (digit7) + " " + (digit8) + " " + (digit9));
+ System.out.println("inputISBN: " + inputISBN);
+ System.out.println("ISBN split into 9 digits: " + (digit1) + " " + (digit2) + " " + (digit3) + " " + (digit4) + " " + (digit5) + " " + (digit6) + " " + (digit7) + " " + (digit8) + " " + (digit9));
}
outputISBN = ((digit1 * 1) + (digit2 * 2) + (digit3 * 3) + (digit4 * 4) + (digit5 * 5) + (digit6 * 6) + (digit7 * 7) + (digit8 * 8) + (digit9 * 9)) % 11;
-
if (outputISBN == 10)
{
- System.out.println("The ISBN-10 number is " + inputISBN + "X");
+ System.out.println("The ISBN-10 number is " + digit1+digit2+digit3+digit4+digit5+digit6+digit7+digit8+digit9 + "X");
}
else
{
- System.out.println("The ISBN-10 number is " + inputISBN + outputISBN);
+ System.out.println("The ISBN-10 number is " + digit1+digit2+digit3+digit4+digit5+digit6+digit7+digit8+digit9 + outputISBN);
}
}
}
diff --git a/MP2_CalebFontenot/src/main/java/com/calebfontenot/mp2_calebfontenot/CheckIBSN_10.java b/MP2_CalebFontenot/src/main/java/com/calebfontenot/mp2_calebfontenot/CheckIBSN_10.java
index 3364a45..0ff6f6d 100644
--- a/MP2_CalebFontenot/src/main/java/com/calebfontenot/mp2_calebfontenot/CheckIBSN_10.java
+++ b/MP2_CalebFontenot/src/main/java/com/calebfontenot/mp2_calebfontenot/CheckIBSN_10.java
@@ -17,8 +17,7 @@ public class CheckIBSN_10 {
Scanner input = new Scanner(System.in);
// define vars
int digit1, digit2, digit3, digit4, digit5, digit6, digit7, digit8, digit9, inputISBN, outputISBN;
- boolean debug = false;
-
+ boolean debug = true;
// Scan individual numbers
System.out.print("Enter the first 9 digits of an ISBN as an integer: ");
inputISBN = input.nextInt(); // Get the first 9 digits of the ISBN
@@ -44,15 +43,14 @@ public class CheckIBSN_10 {
// Calculate!
outputISBN = ((digit1 * 1) + (digit2 * 2) + (digit3 * 3) + (digit4 * 4) + (digit5 * 5) + (digit6 * 6) + (digit7 * 7) + (digit8 * 8) + (digit9 * 9)) % 11;
-
//Output
if (outputISBN == 10)
{
- System.out.println("The ISBN-10 number is " + inputISBN + "X");
+ System.out.println("The ISBN-10 number is " + digit1+digit2+digit3+digit4+digit5+digit6+digit7+digit8+digit9 + "X");
}
else
{
- System.out.println("The ISBN-10 number is " + inputISBN + outputISBN);
+ System.out.println("The ISBN-10 number is " + digit1+digit2+digit3+digit4+digit5+digit6+digit7+digit8+digit9 + outputISBN);
}
}
}