Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NIS In Class Activities Content Create a brief program that demonstrates use of a java exception. For example, you could use Input MismatchException and ask

image text in transcribed
image text in transcribed
NIS In Class Activities Content Create a brief program that demonstrates use of a java exception. For example, you could use Input MismatchException and ask the user to input an integer and show that the program executes correctly if they enter an integer and also show that the exception is thrown and a proper error message is displayed to the user if they input a string of letters. You may want to try it with and without a try catch block for practice, but either one will be sufficient for credit In Class Activities Content Learning objectives, practice with abstract classes, use of interfaces, team code development, code integration, and code reuse For this class exercise, you may self-enroll into groups prior to or during class. Note that if you are not able to attend class due to illness, you may submit individually by email to your TA by the due date. Submit all your files and execution screenshots to this assignment You will be writing two programs, one demonstrating abstract classes and one demonstrating interfaces. When completed, you will submit your java class files, and execution screenshots. List all the names of your group members in the header of your main/test program file Examples are provided at the following sites for this exercise only, you may reuse portions of code from these sites without citing the reference https://www.w3schools.com/java/java_interface.asp http://www.beginwithjava.com/java/inheritance/interfaces.html https://javatutorial.net/java-polymorphism-example https://beginnersbook.com/2013/05/java-abstract-class-method/ Abstract Classes: Write a brief program that demonstrates the use of abstract classes. Create the abstract class, 3 subclasses, and a program that demonstrates the execution by displaying an object of each class and their related properties. create an abstract class with animalSound, gettype, and getName methods and a name attribute .create 3 subclasses that extend the abstract class Use a constructor in each subclass with a parameter sent from the main program for the name of an animal .create two objects of each subclass and display animal name (Fido, Kitty, etc.), type (dog, cat, horse) and sound for each. Interfaces: Write a brief program that demonstrates the use of interfaces. Create the interface, 3 classes that implement the Interface and a program that demonstrates the execution by displaying an object of each class and their related properties. .create an interface with getName, getType, and animaiSound create 3 classes that implement the interface (dog, cat horse) Use a constructor in the class with a parameter sent from the main program for the name of an animal display animal name (Fido, Kitty, etc), type (dog, cat, horse) and sound for each N

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions