Answered step by step
Verified Expert Solution
Question
1 Approved Answer
can you please help me to solve this java program - Write a custom exception, throw it and handle it Create an Eclipse Project called
can you please help me to solve this java program
- Write a custom exception, throw it and handle it Create an Eclipse Project called JavaProgram. Write a class called MyMobileNetworkChecker that will attempt to verify the network of your mobile phone and throw an exception using exception handling if the make entered does not match. Create a custom exception class called NotMyNetworkException. Write a static method within the MyMobileNetworkChecker class called checkMyMobileNetwork(String inputNetwork) that declares (throws) the custom NotMyNetworkException exception. Implement the checkMyMobileNetwork method so that it matches the string entered with your network name (e.g. Vodafone, Three etc.), if it succeeds output a message to verify the network passed is correct, if the string passed is checked and it is NOT the same as your make of phone throw a NotMyNetworkException using the keyword throw. Test the calling of the checkMyMobileNetwork method in the main (test the passing of the incorrect phone make to the method so that the exception is thrown). Fully Javadoc the project including the method. Jar the project and test the running of the project from the jarfile. Required activities and marking guideline: - Implement the custom exception (extends Exception) - Implement the check make method with throws keyword - Handle the custom exception in the main - Test the custom exception is thrown\caught - Javadoc the class (especially the method) - Jar the project and run the JarfileStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started