The Errors in Programs Assignment
Order ID# 45178248544XXTG457 Plagiarism Level: 0-0.5% Writer Classification: PhD competent Style: APA/MLA/Harvard/Chicago Delivery: Minimum 3 Hours Revision: Permitted Sources: 4-6 Course Level: Masters/University College Guarantee Status: 96-99% Instructions
The Errors in Programs Assignment
Errors occur in programs, and there are two ways to address the problems. The first is to try to write code that checks for errors and then deals with them. For example, you can use error checking to see if a user selected a valid menu option after making a selection. Error checking tries to prevent errors from occurring. Another method is to go ahead and let errors occur but to handle them gracefully before they can affect the operation of the program. This method, called exception handling, will be the focus of this project.
For this project, you will write a Java program that demonstrates exception handling. Your program will accept from the user ten values and place those numbers in an array. The numbers in the array will be added together and the result displayed to the user. The program will also perform division. The program should compare the values for elements 1 and 2 in
the array and divide the larger number by the smaller number. It should compare the values for all odd/even elements and divide the larger by the smaller value. The program should use exception handling to avoid division by zero errors or out of range errors (dictated by the variable’s data type) which would cause the program to stop due to the error. The program
should prompt the user for a second set of ten numbers. When the user enters 9999 the program should terminate normally.
For this project, do the following:
The Errors in Programs Assignment
Create a new project in your IDE named “ExceptionHandler.”
Write code to accept numbers as described above from the user. Your code should ensure that only numbers are accepted.
Write code to add all values together and to divide larger numbers by smaller numbers in odd/even elements. Results should be displayed. Loop to get another set of ten numbers from the user until the user enters 9999 as the first number.
Use exception handling to handle division by zero and out of range exceptions.
In the catch blocks, be sure to display the cause of the exception to the user.
The Errors in Programs Assignment
Make sure your exception handler will handle any other errors as a default.
Create a UML activity diagram that illustrates how your program works. Your diagram must include all the data items in your program.
Use good comments to describe how the program works. The Errors in Programs Assignment
Make sure the program runs correctly before submission.
Create a zip that includes your project folder and Word document, and upload it to the course portal.
The Errors in Programs Assignment
RUBRIC
Excellent Quality 95-100%
Introduction 45-41 points
The background and significance of the problem and a clear statement of the research purpose is provided. The search history is mentioned.
Literature Support 91-84 points
The background and significance of the problem and a clear statement of the research purpose is provided. The search history is mentioned.
Methodology 58-53 points
Content is well-organized with headings for each slide and bulleted lists to group related material as needed. Use of font, color, graphics, effects, etc. to enhance readability and presentation content is excellent. Length requirements of 10 slides/pages or less is met.
Average Score 50-85%
40-38 points More depth/detail for the background and significance is needed, or the research detail is not clear. No search history information is provided.
83-76 points Review of relevant theoretical literature is evident, but there is little integration of studies into concepts related to problem. Review is partially focused and organized. Supporting and opposing research are included. Summary of information presented is included. Conclusion may not contain a biblical integration.
52-49 points Content is somewhat organized, but no structure is apparent. The use of font, color, graphics, effects, etc. is occasionally detracting to the presentation content. Length requirements may not be met.
Poor Quality 0-45%
37-1 points The background and/or significance are missing. No search history information is provided.
75-1 points Review of relevant theoretical literature is evident, but there is no integration of studies into concepts related to problem. Review is partially focused and organized. Supporting and opposing research are not included in the summary of information presented. Conclusion does not contain a biblical integration.
48-1 points There is no clear or logical organizational structure. No logical sequence is apparent. The use of font, color, graphics, effects etc. is often detracting to the presentation content. Length requirements may not be met
You Can Also Place the Order at www.perfectacademic.com/orders/ordernow or www.crucialessay.com/orders/ordernow The Errors in Programs Assignment
The Errors in Programs Assignment