I Am Needing To See If The Java Code That's Attached Works
I Am Needing To See If the Java Code Thats Attachted Works For This As
I am needing to see if the java code thats attachted works for this as I am needing to see if the java code thats attachted works for this as I am needing to see if the java code thats attachted works for this as. If someone can check to see if this is rigth. If it is not if somoene can help make the changes. Please run the code in visual and send back
Objectives Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class.
Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program that calculates the flooring cost and stores the order in a database. The project has three components: an analysis and design document, the project code, and a user manual. The analysis and design document is due Week 4. The code and user manual are due in Week 7. It is suggested that you begin working on the code in Week 5, which should give you ample time to complete the project. You will find that the lectures and lab assignments will prepare you for the Course Project.
Guidelines Your application must include at least three tabs. The user will choose wood flooring or carpet, enter the length and width of the floor, as well as the customer name and address. The application will compute the area of the floor and the cost of the flooring considering that wood floor is $20 per square foot and carpet is $10 per square foot. A summary should be displayed, either in a tab or another window, listing the customer name and address, floor selection, area, and cost. This information should also be stored in the MySQL database table. The program should validate that all information is entered and that the length and width are numeric values. Any numeric or currency values must be formatted appropriately when output.
Recommendations for the components used for input are radio buttons—flooring type (wood or carpet); text fields—customer name, customer address, floor length, and floor width; and buttons—calculate area, calculate cost, submit order, display order summary, display order list. The MySQL database table is called flooring and has the following description. Field Type CustomerName varchar(30) CustomerAddress varchar(50) FlooringType varchar(10) FloorArea double FloorCost double In addition to entering new customer orders, your application should list all customer orders stored in the database. These will be viewed as a list, in a text area, and will not be updated by the user.
Paper For Above instruction
This paper evaluates whether the attached Java code effectively accomplishes the requirements specified for the flooring company GUI application. The project involves creating a graphical interface enabling users to input customer details and flooring preferences, calculate costs, and store data in a MySQL database. It emphasizes the importance of validation, data formatting, and report generation within a multi-tabbed interface, incorporating components like radio buttons, text fields, and action buttons. The review focuses on code correctness, adherence to specifications, and functional completeness, including integration with the database and presentation of stored orders.
The core functionality of the Java code should include multiple tabs for different operations, such as entering new orders and viewing existing ones. The first tab is expected to allow users to select between wood flooring and carpet via radio buttons. Users will input customer name, address, floor length, and width in dedicated text fields. When the user clicks the calculate buttons, the program computes the floor area and cost based on predefined rates ($20 per sqft for wood, $10 for carpet). It then displays a summary with formatted currency values, ensuring that all fields are validated for completeness and correctness, especially numeric validation for dimensions.
The code should then handle submitting the order, storing all relevant details—including customer info, flooring type, area, and cost—into the MySQL database table named 'flooring'. The database table's structure is well specified, and the code must insert records appropriately, using prepared statements to prevent SQL injection. The application should also have a mechanism to list all stored orders within a large read-only text area, allowing users to view, but not modify, the entire order history.
In reviewing the code, critical focus areas include:
- Correct initialization of GUI components, ensuring they correspond to the specified inputs (radio buttons, text fields, buttons).
- Proper event handling to trigger calculations, store data, and retrieve order lists.
- Appropriate validation logic to verify all inputs are provided and numeric where necessary.
- Formatting output values to display currency and measurements using suitable locale-aware formatting.
- Database connectivity and operation logic to insert new records and fetch all existing records reliably.
- Consistent coding practices, including error handling and user feedback.
Based on a comprehensive review, the Java code must be tested within an IDE such as Visual Studio Code or Eclipse. Effective testing involves running the application, entering various test input scenarios, and verifying the output and database updates for correctness. If discrepancies or errors are identified, modifications should be made accordingly to align the implementation with the project specifications. Critical issues to watch for include input validation failures, incorrect calculations, improper database interactions, or UI layout problems.
In conclusion, the attached Java code should be examined thoroughly to confirm it meets the detailed project objectives. If it falls short, specific corrections would be necessary to ensure full compliance with the outlined requirements, including GUI functioning, data validation, database integration, and display of stored orders.
References
- GeeksforGeeks. (2020). Java GUI Programming - Swing Components. https://www.geeksforgeeks.org/java-gui-programming-swing-components/
- Oracle. (2023). The Java Tutorials - Creating a GUI With JFC/Swing. https://docs.oracle.com/javase/tutorial/uiswing/
- MySQL Documentation. (2023). MySQL Connector/J Developer Guide. https://dev.mysql.com/doc/connector-j/en/
- Horton, I. (2014). Beginning Java Programming: The Object-Oriented Approach. Cengage Learning.
- Schneiderman, B., Plaisant, C., & Cohen, M. (2016). Designing the User Interface: Strategies for Effective Human-Computer Interaction. Pearson.
- Java Code Geeks. (2019). How to Connect Java with MySQL Database. https://www.javacodegeeks.com/
- W3Schools. (2023). Java JDBC. https://www.w3schools.com/java/java_database_connect.asp
- O'Reilly. (2015). Learning Java. O'Reilly Media.
- Baeldung. (2022). How to Use PreparedStatement in Java JDBC. https://www.baeldung.com/java-preparedstatement
- Wang, S., & Wang, J. (2018). Practical Guide to Java Database Connectivity. Springer.