Java Programming

The program needs to be done within the two class methods. Attached all the information, and the necessary template to use, along with the grading sheet. Just looking to get a working program that fulfills all the necessary requirements. It doesn't need to be perfect

Get Help With a similar task to - Java Programming

Login to view and/or buy answers.. or post an answer
Additional Instructions:

HW Java Info/HW3_PostalBarCode_Template.zip HW3_PostalBarCode_Template/PostalBarCodeApp/build.xml Builds, tests, and runs the project PostalBarCodeApp. HW3_PostalBarCode_Template/PostalBarCodeApp/build/built-jar.properties #Sun, 30 Dec 2018 19:25:30 -0500 C\:\\My_Documents\\Spring2019\\IST242\\HW3_PostalBarCode_Template\\PostalBarCodeApp= HW3_PostalBarCode_Template/PostalBarCodeApp/build/classes/PostalBarCode$1.class synchronized class PostalBarCode$1 implements java.awt.event.ActionListener { void PostalBarCode$1(PostalBarCode); public void actionPerformed(java.awt.event.ActionEvent); } HW3_PostalBarCode_Template/PostalBarCodeApp/build/classes/PostalBarCode$2.class synchronized class PostalBarCode$2 implements java.awt.event.ActionListener { void PostalBarCode$2(PostalBarCode); public void actionPerformed(java.awt.event.ActionEvent); } HW3_PostalBarCode_Template/PostalBarCodeApp/build/classes/PostalBarCode$3.class synchronized class PostalBarCode$3 implements java.awt.event.ActionListener { void PostalBarCode$3(PostalBarCode); public void actionPerformed(java.awt.event.ActionEvent); } HW3_PostalBarCode_Template/PostalBarCodeApp/build/classes/PostalBarCode$4.class final synchronized class PostalBarCode$4 implements Runnable { void PostalBarCode$4(); public void run(); } HW3_PostalBarCode_Template/PostalBarCodeApp/build/classes/PostalBarCode.class public synchronized class PostalBarCode extends javax.swing.JFrame { private javax.swing.JButton barButton; private javax.swing.JLabel barLabel; private javax.swing.JTextField barText; private javax.swing.JButton clearButton; private javax.swing.JButton zipButton; private javax.swing.JLabel zipLabel; private javax.swing.JTextField zipText; public void PostalBarCode(); private void initComponents(); private void barButtonActionPerformed(java.awt.event.ActionEvent); private void clearButtonActionPerformed(java.awt.event.ActionEvent); private void zipButtonActionPerformed(java.awt.event.ActionEvent); public static void main(String[]); public String toZipCode(String); public String toPostalBarCode(String); } HW3_PostalBarCode_Template/PostalBarCodeApp/manifest.mf Manifest-Version: 1.0 X-COMMENT: Main-Class will be added automatically by build HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/build-impl.xml 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: 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 HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/genfiles.properties build.xml.data.CRC32=5d6d3d2a build.xml.script.CRC32=2ef02b73 build.xml.stylesheet.CRC32=8064a381@1.80.1.48 # 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=5d6d3d2a nbproject/build-impl.xml.script.CRC32=c4c904bb nbproject/build-impl.xml.stylesheet.CRC32=830a3534@1.80.1.48 HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/private/config.properties HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/private/private.properties compile.on.save=true do.depend=false do.jar=false javac.debug=true javadoc.preview=true user.properties.file=C:\\Users\\dls102.PSU\\AppData\\Roaming\\NetBeans\\8.2\\build.properties HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/private/private.xml file:/C:/My_Documents/Spring2019/IST242/HW3_PostalBarCode_Template/PostalBarCodeApp/src/PostalBarCode.java HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/project.properties annotation.processing.enabled=true annotation.processing.enabled.in.editor=false annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output application.title=PostalBarCodeApp application.vendor=dls102 build.classes.dir=${build.dir}/classes build.classes.excludes=**/*.java,**/*.form # This directory is removed when the project is cleaned: build.dir=build build.generated.dir=${build.dir}/generated build.generated.sources.dir=${build.dir}/generated-sources # Only compile against the classpath explicitly listed here: build.sysclasspath=ignore build.test.classes.dir=${build.dir}/test/classes build.test.results.dir=${build.dir}/test/results # Uncomment to specify the preferred debugger connection transport: #debug.transport=dt_socket debug.classpath=\ ${run.classpath} debug.test.classpath=\ ${run.test.classpath} # Files in build.classes.dir which should be excluded from distribution jar dist.archive.excludes= # This directory is removed when the project is cleaned: dist.dir=dist dist.jar=${dist.dir}/PostalBarCodeApp.jar dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= includes=** jar.compress=false javac.classpath= # Space-separated list of extra javac options javac.compilerargs= javac.deprecation=false javac.external.vm=false javac.processorpath=\ ${javac.classpath} javac.source=1.8 javac.target=1.8 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir} javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= javadoc.author=false javadoc.encoding=${source.encoding} javadoc.noindex=false javadoc.nonavbar=false javadoc.notree=false javadoc.private=false javadoc.splitindex=true javadoc.use=true javadoc.version=false javadoc.windowtitle= main.class=PostalBarCode manifest.file=manifest.mf meta.inf.dir=${src.dir}/META-INF mkdist.disabled=false platform.active=default_platform run.classpath=\ ${javac.classpath}:\ ${build.classes.dir} # Space-separated list of JVM arguments used when running the project. # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. # To set system properties for unit tests define test-sys-prop.name=value: run.jvmargs= run.test.classpath=\ ${javac.test.classpath}:\ ${build.test.classes.dir} source.encoding=UTF-8 src.dir=src test.src.dir=test HW3_PostalBarCode_Template/PostalBarCodeApp/nbproject/project.xml org.netbeans.modules.java.j2seproject PostalBarCodeApp HW3_PostalBarCode_Template/PostalBarCodeApp/src/PostalBarCode.form HW3_PostalBarCode_Template/PostalBarCodeApp/src/PostalBarCode.java HW3_PostalBarCode_Template/PostalBarCodeApp/src/PostalBarCode.java /*  * To change this license header, choose License Headers in Project Properties.  * To change this template file, choose Tools | Templates  * and open the template in the editor.  */ /**  *  * @author dls102  */ public class PostalBarCode extends javax.swing.JFrame {     /**      * Creates new form PostalBarCode      */     public PostalBarCode() {         initComponents();     }     /**      * This method is called from within the constructor to initialize the form.      * WARNING: Do NOT modify this code. The content of this method is always      * regenerated by the Form Editor.      */     @SuppressWarnings("unchecked")     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents     private void initComponents() {         zipLabel = new javax.swing.JLabel();         zipText = new javax.swing.JTextField();         barButton = new javax.swing.JButton();         clearButton = new javax.swing.JButton();         zipButton = new javax.swing.JButton();         barLabel = new javax.swing.JLabel();         barText = new javax.swing.JTextField();         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);         zipLabel.setText("Zip Code:");         zipText.setText("18512");         barButton.setText("Bar");         barButton.addActionListener(new java.awt.event.ActionListener() {             public void actionPerformed(java.awt.event.ActionEvent evt) {                 barButtonActionPerformed(evt);             }         });         clearButton.setText("Clear");         clearButton.addActionListener(new java.awt.event.ActionListener() {             public void actionPerformed(java.awt.event.ActionEvent evt) {                 clearButtonActionPerformed(evt);             }         });         zipButton.setText("Zip");         zipButton.addActionListener(new java.awt.event.ActionListener() {             public void actionPerformed(java.awt.event.ActionEvent evt) {                 zipButtonActionPerformed(evt);             }         });         barLabel.setText("Postal Bar Code:");         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());         getContentPane().setLayout(layout);         layout.setHorizontalGroup(             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(layout.createSequentialGroup()                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                     .addGroup(layout.createSequentialGroup()                         .addGap(111, 111, 111)                         .addComponent(zipLabel))                     .addGroup(layout.createSequentialGroup()                         .addGap(57, 57, 57)                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)                             .addComponent(zipText, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)                             .addComponent(barText, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE)                             .addGroup(layout.createSequentialGroup()                                 .addComponent(barButton)                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)                                 .addComponent(clearButton)                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)                                 .addComponent(zipButton)))))                 .addContainerGap(53, Short.MAX_VALUE))             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()                 .addGap(0, 0, Short.MAX_VALUE)                 .addComponent(barLabel)                 .addGap(97, 97, 97))         );         layout.setVerticalGroup(             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)             .addGroup(layout.createSequentialGroup()                 .addContainerGap()                 .addComponent(zipLabel)                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)                 .addComponent(zipText, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)                 .addGap(34, 34, 34)                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)                     .addComponent(barButton)                     .addComponent(clearButton)                     .addComponent(zipButton))                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 33, Short.MAX_VALUE)                 .addComponent(barLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)                 .addComponent(barText, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)                 .addGap(19, 19, 19))         );         pack();     }// </editor-fold>//GEN-END:initComponents     private void barButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_barButtonActionPerformed         // TODO add your handling code here:         String barCodeText = toPostalBarCode(zipText.getText());     barText.setText(barCodeText);     }//GEN-LAST:event_barButtonActionPerformed     private void clearButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_clearButtonActionPerformed         barText.setText("");  // Write empty string to text fields     zipText.setText("");     }//GEN-LAST:event_clearButtonActionPerformed     private void zipButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_zipButtonActionPerformed         String zipCodeText = toZipCode(barText.getText());     zipText.setText(zipCodeText);     }//GEN-LAST:event_zipButtonActionPerformed     /**      * @param args the command line arguments      */     public static void main(String args[]) {         /* Set the Nimbus look and feel */         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html           */         try {             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {                 if ("Nimbus".equals(info.getName())) {                     javax.swing.UIManager.setLookAndFeel(info.getClassName());                     break;                 }             }         } catch (ClassNotFoundException ex) {             java.util.logging.Logger.getLogger(PostalBarCode.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);         } catch (InstantiationException ex) {             java.util.logging.Logger.getLogger(PostalBarCode.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);         } catch (IllegalAccessException ex) {             java.util.logging.Logger.getLogger(PostalBarCode.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);         } catch (javax.swing.UnsupportedLookAndFeelException ex) {             java.util.logging.Logger.getLogger(PostalBarCode.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);         }         //</editor-fold>         /* Create and display the form */         java.awt.EventQueue.invokeLater(new Runnable() {             public void run() {                 new PostalBarCode().setVisible(true);             }         });     }     // Variables declaration - do not modify//GEN-BEGIN:variables     private javax.swing.JButton barButton;     private javax.swing.JLabel barLabel;     private javax.swing.JTextField barText;     private javax.swing.JButton clearButton;     private javax.swing.JButton zipButton;     private javax.swing.JLabel zipLabel;     private javax.swing.JTextField zipText;     // End of variables declaration//GEN-END:variables public String toZipCode (String bc) {     return "toZipCode executing"; }      public String toPostalBarCode (String zc) {     return "toBarCode executing..."; } } HW Java Info/HW3_PostalBarCodes.pdf Postal Bar Codes Homework Assignment For faster sorting of letters, the United States Postal Service encourages companies that send large volumes of mail to use a bar code denoting the Zip code. **************** ECRLOT ** CO57 CODE C671RTS2 JOHN DOE 1002 MONTANA BLVD SUNNYVALE CA 95014-5143 The encoding scheme for a five-digit ZIP code is shown above. There are full height frame bars on each side. The five encoded digits are followed by a correction digit, which is computed as follows: Add up all the digits, and choose the correction digit to make the sum a multiple of 10. For example, the ZIP code 95014 has sum of digits 19, so the correction digit is 1 to make the sum equal to 20. Each digit of the ZIP code, and the correction digit, is encoded according to the following table: 7 4 2 1 0 1 0 0 0 1 1 2 0 0 1 0 1 3 0 0 1 1 0 4 0 1 0 0 1 5 0 1 0 1 0 6 0 1 1 0 0 7 1 0 0 0 1 8 1 0 0 1 0 9 1 0 1 0 0 0 1 1 0 0 0 where 0 denotes a half bar and 1 a full bar. Note that they represent all combinations of two full and three half bars. The digit can be easily computed from the bar code using the column weights 7, 4, 2, 1, 0. For example, 01100 is 0*7 + 1*4 + 1*2 + 0*1 + 0*0 = 6. The only exception is 0, which would yield 11 according to the weight formula. Digits 1 2 3 4 5 6 8 7 9 Check Digit Frame Bars For this assignment, you are to create a Java Application, named PostalBarCode, which performs the following conversion processing. Your program should include a toZipCode method that accepts a bar code string and returns the converted zip code string and a toPostalBarCode method that accepts a zip code string and returns the converted bar code string. Your application should contain two text fields with appropriate labels: - A Zip Code text field for entry and display of a Zip Code string - A Postal Bar Code text field for the entry and display of a Postal Bar Code string. Your application should contain the following three buttons with associated event handling: - A button, with label “Bar”, for converting a zip code to bar code. When the associated event is handled, the program should read the entered zip code string from the Zip Code text field, invoke the toPostalBarCode method, and then display the converted postal bar code in the Postal Bar Code Text Field. Your program should be able to handle both the 5-digit (i.e. 18512) and 9-digit (i.e. 18512-1602) zip codes. An error should be displayed when the input zip code does not match one of these formats. - A button, with label “Zip”, for converting a bar code to a zip code. When the associated event is handled, the program should read the entered bar code string from the Postal Bar Code text field, invoke the toZipCode method, and then display the converted Zip Code in the Zip Code text field. An error should be printed when the input bar code is not valid. - A button, with label “Clear”, for clearing text fields. When the associated event is handled for this button, both the zip code and bar code text fields should be cleared. Use ‘:’ for half bars, ‘|’ for full bars. For example 95014 becomes | | : | : : : | : | : | | : : : : : : | | : | : : | : : : | | | The variables and methods defined within your Java classes must include comments. Your program should also be properly formatted, which includes indentation of code. Milestones: (1) Homework Assigned: Thursday, February 11, 2021 (2) Homework Due: Tuesday, February 23, 2021 by 11:00pm. You are to Zip your entire NetBeans project using WinZip and place it in the HW3_PostalBarCode Drop Box by the stated deadline. Failure to submit the incorrect file or submit a file that is not zipped will result in no grade being assigned for this assignment. HW Java Info/HW3_PostalBarCodes_GradeSheet.docx Calendar Project Notes ( Student Name:_ ________________________ )HW3 – Postal Bar Codes Grade Sheet Class named PostalBarCode (2 points) ______ Method named toZipCode that accepts bar code and returns zip code (2 points) ______ Method named toPostalBarCode that accepts zip code and returns bar code (2 points) ______ Two text fields for zip code and bar code display (2 points) ______ “Bar” button display and event handling (2 points) ______ “Zip” button display and event handling (2 points) ______ “Clear” button display and event processing (2 points) ______ Generating a Postal Bar Code Zip Code Input (2 points) ______ Correction Digit calculation (3 points) ______ Printing of Postal Bar Code (frame bars, zip code, digit) (3 points) ______ Processing for both 5 and 9-digit zip codes (4 points) ______ Input Data Validation – 5 or 9 digit Zip Code does not match format (4 points) ______ Generating a Zip Code Bar code input (2 points) ______ Printing of Zip Code (4 points) ______ Conversion of postal codes to 5 and 9 digit zip codes (5 points) ______ Correction Digit Check/Error Message (5 points) ______ Comments and proper formatting (4 points) ______ Total Points (50): ______ 2

Related Questions

Similar orders to Java Programming
7
Views
0
Answers
Need to create java code for telephone directory with the following instructions:
Implementation of class(s), object(s), method(s) and arrays are compulsory. Display a menu or selection window or title screen about your project. Take user information/data who is using the Telephone Directory. Your solution must have search features t...
23
Views
0
Answers
Java FX, pre-existing code adding math operators and a user menu DUE @ 11:50pm (please request more money if needed)
Take the code provided: - You may not edit the files in the cis260 package (but you may add new files) - You can edit files in the scenebuilder package. You'll need to add the following functionality to the program: 1. Add a menu option ...
7
Views
0
Answers
Java FX CIS 260 Homework, Using scene builder, adding user menu to pre existing code, and buttons.
Take the code provided, You'll need to add the following functionality to the program: 1. Add a menu option that lets the user print the selected math operations to a file. 2. Add support for the following math operations: < <= > >= 3. 3 value s...
14
Views
0
Answers
java program in netbeans and using SQL workbench for a connected database
I have 80 % of my project done I just dont know how to add this binary tree code that asks the users interview questions. TO Play when click the interview button here's a description of what its about Develop an application that interviews a patient fo...