Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying this again. Please don't copy and paste other answers posted here or elsewhere that are wrong. I really need some help with the

I'm trying this again. Please don't copy and paste other answers posted here or elsewhere that are wrong. I really need some help with the following assignment.

image text in transcribed

The statement added to the CustomerTextFile class that throws an IOException should be commented out.

I uploaded the starting files here: http://s000.tinyupload.com/index.php?file_id=08703520709618323684

I'm having a hard time with the last part of the assignment: "Modify the CustomerManagerApp class so it handles all exceptions appropriately."

Here is what I need to accomplish:

image text in transcribed

If someone could point me in the right direction, I would appreciate it. Thanks a lot!

Chapter 16 Project: Customer Manager Improve the exception handling for an application that manages customer data. Console for a FileNotFoundException Welcome to the Customer Manager Error reading data file! Exiting application. java.io.FileNotFoundException: customers.txt (The system cannot find the file specified) Console for an IOException Welcome to the Customer Manager COMMAND MENU list add del help exit - List all customers -Add a customer - Delete a customer -Show this menu - Exit this application Enter a command: add Enter first name: John Enter last name: Doe Enter customer email: johndoe@x.com Error adding customer. Try again. Enter a command: Specifications . Your instructor should provide you with a starting project for a Customer Manager application that allows you to add and delete customer records. This source code should be the same as the solution for exercise 15-1 in the book Modify the CustomerTextFile class so it throws all exceptions to the calling class. To get this to work, you'll need to modify the DAO interface so each of its methods throws the IOException. .Modify the CustomerManager App class so it handles all exceptions appropriately . If the application can't find the file that stores the data, display an error message and exit the application. To cause a FileNotFoundException, you can move or rename the data file If the application can't add or delete a record, display an error message and allow the user to try again. To simulate an IOException, you can add a statement to the CustomerTextFile class that throws an IOException. . Criteria Ratings Pts Throws to calling class CustomerTextFile class throws all exceptions to the calling class 10.0 pts Full Marks 0.0 pts 10.0 pts Marks DAO modifications 10.0 pts Full Marks 0.0 pts Modify the DAO interface so each of its methods throws the IOException 10.0 pts Marks Exit on missing file If the application can't find the file that stores the data, display an error message and exit the application 12.0 pts Full Marks 0.0 pts 12.0 pts Marks Update failure error message If the application can't add or delete a record, display an error message and allow the user to try again 13.0 pts Full Marks 0.0 pts 13.0 pts Marks Total Points: 45.0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Y = x 6

Answered: 1 week ago

Question

8.8 Evaluate methods of treating substance use disorders.

Answered: 1 week ago

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago

Question

1. What are your creative strengths?

Answered: 1 week ago

Question

What metaphors might describe how we work together?

Answered: 1 week ago