Two Completely Different Parts Assignment First Create Use Custom Exception Second Create Q25347178

There are two completely different parts for this assignment. The first will be to create and use a custom exception, and the second to create an abstract class. Write Java programs that meets the following requirements with good programming style using concepts covered through chapter 13. Part 1. Using assignment 4, define a Custom Exception Class that prints a message if the user orders a bread or filling that is not offered by the sandwich shop. Next make a change to the Sandwich Ordering program by adding a try catch block to check the input, provide a message that states the problem and allows the user to enter the correct bread or filling Part 2. Create an abstract Bird class with fields for color and subspecies, including get and set methods for both these fields. Include an abstract method for sound. Create two subclasses for individual species of bird (for example, Chicken or Dove) which overrides the sound method. Finally write an application that uses the subclasses to create the objects and display information about the different birds. Possible output could be: I am a chicken type Longhorn, my color is white and I cluck. As always, at the beginning of the program, add the standard comments. Purpose: Create a java program from detailed directions. Ability to Follow established programming conventions for writing java programs Able to create a custom Exception Able to use a try...catch block Able to create and use Abstract classes and methods Able to create parent/child classes Able to create an array Able to instantiate objects Able to use loops and IF statements Use the print statement for output For each part take a picture of your code, compile, output and Zip all files (java and picture files) Upload your 2 zipped files in the Assignment 5 folder under Assignments.

There are two completely different parts for this assignment. The first will be to create and use a custom exception, and the second to create an abstract class. Write Java programs that meets the following requirements with good programming style using concepts covered through chapter 13. Part 1. Using assignment 4, define a Custom Exception Class that prints a message if the user orders a bread or filling that is not offered by the sandwich shop. Next make a change to the Sandwich Ordering program by adding a try catch block to check the input, provide a message that states the problem and allows the user to enter the correct bread or filling Part 2. Create an abstract Bird class with fields for color and subspecies, including get and set methods for both these fields. Include an abstract method for sound. Create two subclasses for individual species of bird (for example, Chicken or Dove) which overrides the sound method. Finally write an application that uses the subclasses to create the objects and display information about the different birds. Possible output could be: “I am a chicken type Longhorn, my color is white and I cluck.” As always, at the beginning of the program, add the standard comments. Purpose: Create a java program from detailed directions. Ability to Follow established programming conventions for writing java programs Able to create a custom Exception Able to use a try…catch block Able to create and use Abstract classes and methods Able to create parent/child classes Able to create an array Able to instantiate objects Able to use loops and IF statements Use the print statement for output For each part take a picture of your code, compile, output and Zip all files (java and picture files) Upload your 2 zipped files in the Assignment 5 folder under “Assignments”. Show transcribed image text

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *