Java programming You need to write two different java program (part 1 & part 2). Part 1. Credit Card Input We need to write a credit card form validator, the form consists of number (16 digits), an...

1 answer below »
See attachment.


Java programming You need to write two different java program (part 1 & part 2). Part 1. Credit Card Input We need to write a credit card form validator, the form consists of number (16 digits), an expiration date and a CCV (Card Code verification) that for Amex is 4 digits long for other cards is 3 digits long. Visas start with a 4, MasterCard’s a 5, Amex a 34 or 37 and JCB with 35. When typing the number, the logo should be displayed in the image field that should be included with the card validator. The form needs to have the proper layout, text and image field to make it look like the reference image below. Do not use an FXML nor Scene Builder to build this. Part 2. Refactor Credit card input using FXML/Scene Builder Now that you know how to create GUIs by hand, we can take advantage of using Scene Builder to create a FXML file that helps us do as much as possible of the design of the GUI with only small tweaks as needed using code. We are going to modify your part 1 to use FXML now. This process of restructuring existing code to improve it is known as refactor. (Links to an external site.)  Submit your new code as a github link with everything necessary to run the project.
Answered 2 days AfterAug 06, 2021

Answer To: Java programming You need to write two different java program (part 1 & part 2). Part 1. Credit Card...

Shweta answered on Aug 09 2021
136 Votes
89254Solution/CreditCardFXML/build/built-jar.properties
#Mon, 09 Aug 2021 20:12:50 +0530
F\:\\CreditCardFXML=
89254Solution/CreditCardFXML/build/classes/creditcardfxml/amex.jpg
89254Solution/CreditCardFXML/build/classes/creditcardfxml/blank.jpg
89254Solution/CreditCardFXML/build/classes/creditcardfxml/CreditCardFXML.class
package creditcardfxml;
public synchronized class CreditCardFXML extends javafx.application.Application {
public void CreditCardFXML();
public void start(javafx.stage.Stage) throws Exception;
public static void main(String[]);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocument.fxml





























89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController$1.class
package creditcardfxml;
synchronized class FXMLDocumentController$1 {
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController$Amex.class
package creditcardfxml;
synchronized class FXMLDocumentController$Amex extends FXMLDocumentController$CreditCardType {
private static final String PREFIX1 = 34;
private static final String PREFIX2 = 37;
private void FXMLDocumentController$Amex(FXMLDocumentController);
public boolean matches(String);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController$CreditCardType.class
package creditcardfxml;
public synchronized class FXMLDocumentController$CreditCardType {
public void FXMLDocumentController$CreditCardType(FXMLDocumentController);
boolean matches(String);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController$JCB.class
package creditcardfxml;
synchronized class FXMLDocumentController$JCB extends FXMLDocumentController$CreditCardType {
private static final String PREFIX = 35;
private void FXMLDocumentController$JCB(FXMLDocumentController);
public boolean matches(String);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController$Mastercard.class
package creditcardfxml;
synchronized class FXMLDocumentController$Mastercard extends FXMLDocumentController$CreditCardType {
private static final String PREFIX = 5;
private void FXMLDocumentController$Mastercard(FXMLDocumentController);
public boolean matches(String);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController$Visa.class
package creditcardfxml;
synchronized class FXMLDocumentController$Visa extends FXMLDocumentController$CreditCardType {
private static final String PREFIX = 4;
private void FXMLDocumentController$Visa(FXMLDocumentController);
public boolean matches(String);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/FXMLDocumentController.class
package creditcardfxml;
public synchronized class FXMLDocumentController implements javafx.fxml.Initializable {
private javafx.scene.image.ImageView imageView;
private javafx.scene.image.ImageView rightImageView;
private javafx.scene.control.TextField txtCardNumber;
private javafx.scene.control.TextField txtExpiryDate;
private javafx.scene.control.TextField txtCVV;
private javafx.scene.text.Text validExpiryDate;
private javafx.scene.text.Text validCVV;
int flag;
public void FXMLDocumentController();
public void initialize(java.net.URL, java.util.ResourceBundle);
public void CardNumberChange();
public void ExpiryDateChange();
public void CVVChange();
public boolean isValidCreditCardNumber(String);
}
89254Solution/CreditCardFXML/build/classes/creditcardfxml/jcb.jpg
89254Solution/CreditCardFXML/build/classes/creditcardfxml/master.jpg
89254Solution/CreditCardFXML/build/classes/creditcardfxml/notselected.jpg
89254Solution/CreditCardFXML/build/classes/creditcardfxml/right.jpg
89254Solution/CreditCardFXML/build/classes/creditcardfxml/visa.jpg
89254Solution/CreditCardFXML/build/classes/images/blank.jpg
89254Solution/CreditCardFXML/build/classes/images/notselected.jpg
89254Solution/CreditCardFXML/build.xml

Builds, tests, and runs the project CreditCardFXML.


89254Solution/CreditCardFXML/dist/CreditCardFXML.html
Test page for CreditCardFXML
Webstart: click to launch this app as webstart


89254Solution/CreditCardFXML/dist/CreditCardFXML.jar
META-INF/MANIFEST.MF
Manifest-
Version: 1.0
Implementation-Title: CreditCardFXML
X-COMMENT: Main-Class will be added automatically by build
Implementation-Version: 1.0
Permissions: sandbox
Codebase: *
JavaFX-Version: 8.0
Class-Path:
Created-By: JavaFX Packager
Implementation-Vendor: Acer
Main-Class: creditcardfxml.CreditCardFXML
creditcardfxml/CreditCardFXML.class
package creditcardfxml;
public synchronized class CreditCardFXML extends javafx.application.Application {
public void CreditCardFXML();
public void start(javafx.stage.Stage) throws Exception;
public static void main(String[]);
}
creditcardfxml/FXMLDocument.fxml





























creditcardfxml/FXMLDocumentController$1.class
package creditcardfxml;
synchronized class FXMLDocumentController$1 {
}
creditcardfxml/FXMLDocumentController$Amex.class
package creditcardfxml;
synchronized class FXMLDocumentController$Amex extends FXMLDocumentController$CreditCardType {
private static final String PREFIX1 = 34;
private static final String PREFIX2 = 37;
private void FXMLDocumentController$Amex(FXMLDocumentController);
public boolean matches(String);
}
creditcardfxml/FXMLDocumentController$CreditCardType.class
package creditcardfxml;
public synchronized class FXMLDocumentController$CreditCardType {
public void FXMLDocumentController$CreditCardType(FXMLDocumentController);
boolean matches(String);
}
creditcardfxml/FXMLDocumentController$JCB.class
package creditcardfxml;
synchronized class FXMLDocumentController$JCB extends FXMLDocumentController$CreditCardType {
private static final String PREFIX = 35;
private void FXMLDocumentController$JCB(FXMLDocumentController);
public boolean matches(String);
}
creditcardfxml/FXMLDocumentController$Mastercard.class
package creditcardfxml;
synchronized class FXMLDocumentController$Mastercard extends FXMLDocumentController$CreditCardType {
private static final String PREFIX = 5;
private void FXMLDocumentController$Mastercard(FXMLDocumentController);
public boolean matches(String);
}
creditcardfxml/FXMLDocumentController$Visa.class
package creditcardfxml;
synchronized class FXMLDocumentController$Visa extends FXMLDocumentController$CreditCardType {
private static final String PREFIX = 4;
private void FXMLDocumentController$Visa(FXMLDocumentController);
public boolean matches(String);
}
creditcardfxml/FXMLDocumentController.class
package creditcardfxml;
public synchronized class FXMLDocumentController implements javafx.fxml.Initializable {
private javafx.scene.image.ImageView imageView;
private javafx.scene.image.ImageView rightImageView;
private javafx.scene.control.TextField txtCardNumber;
private javafx.scene.control.TextField txtExpiryDate;
private javafx.scene.control.TextField txtCVV;
private javafx.scene.text.Text validExpiryDate;
private javafx.scene.text.Text validCVV;
int flag;
public void FXMLDocumentController();
public void initialize(java.net.URL, java.util.ResourceBundle);
public void CardNumberChange();
public void ExpiryDateChange();
public void CVVChange();
public boolean isValidCreditCardNumber(String);
}
creditcardfxml/amex.jpg
creditcardfxml/blank.jpg
creditcardfxml/jcb.jpg
creditcardfxml/master.jpg
creditcardfxml/notselected.jpg
creditcardfxml/right.jpg
creditcardfxml/visa.jpg
images/blank.jpg
images/notselected.jpg
89254Solution/CreditCardFXML/dist/CreditCardFXML.jnlp


CreditCardFXML
Acer
null








89254Solution/CreditCardFXML/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
89254Solution/CreditCardFXML/nbproject/build-impl.xml


























































































































Must set platform.home
Must set platform.bootcp
Must set platform.java
Must set platform.javac

The J2SE Platform is not correctly set up.
Your active platform is: ${platform.active}, but the corresponding property "platforms.${platform.active}.home" is not found in the project's properties files.
Either open the project in the IDE and setup the Platform with the same name or add it manually.
For example like this:
ant -Duser.properties.file= jar (where you put the property "platforms.${platform.active}.home" in a .properties file)
or ant -Dplatforms.${platform.active}.home= jar (where no properties file is used)







































































































































































Must set src.dir
Must set test.src.dir
Must set build.dir
Must set dist.dir
Must set build.classes.dir
Must set dist.javadoc.dir
Must set build.test.classes.dir
Must set build.test.results.dir
Must set build.classes.excludes
Must set dist.jar











































































































































































Must set javac.includes












































































































































































No tests executed.

























































































































































































Must set JVM to use for profiling in profiler.info.jvm
Must set profiler agent JVM arguments in profiler.info.jvmargs.agent























































































































































































































































































Must select some files in the IDE or set javac.includes
































































To run this application from the command line without Ant, try:

${platform.java} -jar "${dist.jar.resolved}"

































































































































Must select one file in the IDE or set run.class



Must select one file in the IDE or set run.class






















Must select one file in the IDE or set debug.class




Must select one file in the IDE or set debug.class




Must set fix.includes









This target only works when run from inside the NetBeans IDE.








Must select one file in the IDE or set profile.class
This target only works when run from inside the NetBeans IDE.








This target only works when run from inside the NetBeans IDE.












This target only works when run from inside the NetBeans IDE.































Must select one file in the IDE or set run.class





Must select some files in the IDE or set test.includes




Must select one file in the IDE or set run.class




Must select one file in the IDE or set applet.url




































































































































Must select some files in the IDE or set javac.includes























Some tests failed; see details above.








Must select some files in the IDE or set test.includes



Some tests failed; see details above.



Must select some files in the IDE or set test.class
Must select some method in the IDE or set test.method



Some tests failed; see details above.




Must select one file in the IDE or set test.class



Must select one file in the IDE or set test.class
Must select some method in the IDE or set test.method













Must select one file in the IDE or set applet.url








Must select one file in the IDE or set applet.url





















































89254Solution/CreditCardFXML/nbproject/configs/Run_as_WebStart.properties
# Do not modify this property in this configuration. It can be re-generated.
$label=Run as WebStart
89254Solution/CreditCardFXML/nbproject/configs/Run_in_Browser.properties
# Do not modify this property in this configuration. It can be re-generated.
$label=Run in Browser
89254Solution/CreditCardFXML/nbproject/genfiles.properties
build.xml.data.CRC32=d961eee4
build.xml.script.CRC32=759b1c71
[email protected]
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
nbproject/build-impl.xml.data.CRC32=d961eee4
nbproject/build-impl.xml.script.CRC32=2be31235
nbproject/[email protected]
89254Solution/CreditCardFXML/nbproject/jfx-impl.xml

JavaFX-specific Ant calls
































































































































































































































































































































































































































































































































































































































































































































































































































































































...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here