For this project, you will write a Java program that demonstrates exception handling

In today’s fast-paced academic environment, students often find themselves juggling multiple responsibilities, from attending classes and working part-time jobs to participating in extracurricular activities. The demands of modern education can be overwhelming, leaving students in search of effective solutions to manage their academic workload efficiently. One such solution is the use of Nursingpapertutors.com academic writing website. Nursingpapertutors.com academic writing website employ a cadre of experienced and knowledgeable writers who are well-versed in various academic subjects and writing styles. Nursingpapertutors.com professionals bring a wealth of expertise to the table, enabling them to produce well-researched and well-structured papers that meet the academic standards and expectations of students. Their familiarity with diverse subjects ensures that students can receive assistance across a wide spectrum of disciplines, from mathematics to literature, and from nursing to engineering.

 

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:

  • 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.
  • 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.
  • 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.

This assignment will also be assessed using additional criteria provided here.

Grading Criteria

Project Creation

  • Create a new project in your IDE named “ExceptionHandler.” According to the program criteria stated.
20%

User Input and Calculation

  • Write code to accept 10 numbers from the user and placed in an array.
  • Your code should ensure that only numbers are accepted.
  • The numbers in the array will be added together and the result displayed to the user.
  • 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 prompt the user for a second set of ten numbers. When the user enters 9999 the program should terminate normally.
30%

Exception Handling

  • 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.
  • Make sure your exception handler will handle any other errors as a default.
30%

Source Code Mechanics

  • Code is well documented with comments.
  • Code uses appropriate style and naming conventions.
  • Code is free of errors.
20%

 

One of the significant challenges students face is time management. The demands of coursework, assignments, and exams can create immense pressure, leading to stress and a potential drop in academic performance. Nursingpapertutors.com academic writing website can be a valuable resource for students seeking to balance their responsibilities effectively. By outsourcing some of their academic tasks, students can free up time to focus on studying, participating in meaningful extracurricular activities, or even addressing personal obligations. This improved time management can alleviate the stress associated with academic overload. The ultimate goal of education is to enhance one’s knowledge and skills. Nursingpapertutors.com academic writing websites can play a vital role in achieving this goal by providing students with well-crafted papers that serve as models for their own work. These papers can offer valuable insights into effective research, organization, and writing, thereby empowering students to improve their academic performance over time.

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.