Exception Handling and File Processing
Assignment Overview
Exploring Arrays, ArrayLists, and I/O with Java
This assignment encourages critical thinking, practical application, and reflective writing.
Follow the steps below to complete this assignment.
Assignment Instructions
Step 1: Problem Statement and Code Implementation
Scenario: Write a Java application for a library system.
The application should allow users to:
- Add, remove, and display book details using an ArrayList. Each book should include a title, author, and publication year.
- Save the list of books to a file and load it back using Java’s I/O streams.
- Implement exception handling to gracefully handle:
- Invalid inputs (e.g., empty titles, non-numeric years).
- File not found errors during loading.
- Any other runtime issues.
Instructions
- AI Collaboration:
- Submit the problem statement to an AI tool (e.g., ChatGPT, CoPilot, etc.).
- Request a Java program solution. Save this code and run it. Capture screenshots of the code and the output. This is Set 1.
- Evaluate the code and ask for refinements (minimum of two refinement iterations). Capture screenshots of the revised code and the output. This is Set 2.
- Reflect on the AI-generated code’s effectiveness and your interactions.
- Enhance the Program:
- Implement any missing features or refine the AI-suggested solution as needed.
- Add robust and meaningful comments to improve readability.
- Test the program with at least three different datasets (one of which should include invalid inputs to test exception handling).
- Capture screenshots of the code and the output. This is Set 3.
Step 2: Reflective Report
Submit a report (2-3 pages) that includes:
- Development Process: Describe your experience working with the AI tool. Highlight:
- The strengths and limitations of the generated code.
- The specific refinements you requested and why.
- Technical Insights: Explain how Arrays and ArrayLists were used to solve the problem. Discuss I/O operations and exception handling implemented.
- Challenges and Solutions: Identify challenges faced during coding and how you resolved them.
- Future Improvements: Suggest how the application could be expanded (e.g., additional features, alternative data structures).
- References: Include a reference page to cite your resources. Consult the , which also includes a section on how to cite AI content.
- Add the following three appendices to your document (they do not count towards the page requirement). Remember that you are providing screenshots of your code, not the actual code.
- Appendix A – Set 1 Code and Output
- Appendix B – Set 2 Code and Output
- Appendix C – Set 3 Code and Output
Assignment Expectations
Ensure your MS Word document contains an appropriately formatted cover page, contains page numbers, and complies with APA formatting requirements. Name your file with the course number, assignment, and your name.
Example: CSC-310-Module-1-Project-Neo_Anderson.docx
Submit your document via the LMS Dropbox by the end of the module. Consult the rubric and your instructor with any questions.

Leave a Reply
You must be logged in to post a comment.