Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

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

Recommended Textbook for

Pro SQL Server Wait Statistics

Authors: Enrico Van De Laar

1st Edition

1484211391, 9781484211397

Students also viewed these Databases questions

Question

1. What is meant by Latitudes? 2. What is cartography ?

Answered: 1 week ago

Question

What is order of reaction? Explain with example?

Answered: 1 week ago