Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1: Generics (10 points) Review the WildCardExtendsDemo, SuperWildCardDemo, SuperWildCardDemo and AnyWildCardDemo programs, available on Canvas (Chapter 19) Also, download and read the ManageEmployees program:

image text in transcribed
image text in transcribed
Problem 1: Generics (10 points) Review the WildCardExtendsDemo, SuperWildCardDemo, SuperWildCardDemo and AnyWildCardDemo programs, available on Canvas (Chapter 19) Also, download and read the ManageEmployees program: Your task is to finish this programm. the comments and the main method. It contains an Employee class and a few other classes, e.g. Programmer, that extend Employee. You will need to write four methods to make this program work printNames, addElements, printFavoriteLanguages, and printAll You are required to use wildcards in implementing these methods What the program d oes is outlined in printNames will print the names of all elements of an array list of some sort of employee objects, e.g. ArrayList Employee or ArrayList Programmer>. It does not remove elements from the array list. You are required to use an extends wildcard in the parameter list for this method. addElements will add elements from one array list to another array list. It does not remove elements from either array list. You are required to use a super wildcard in the parameter list of addElements printAll will print all of the elements in an ArrayList, using the toString method. It does not remove elements from the array list. You are required to use an unbounded wildcard in its parameter list printFavoriteLanguages will print the programmer objects, e.g. ArrayList Programmer> or ArrayList

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

Beginning Apache Cassandra Development

Authors: Vivek Mishra

1st Edition

1484201426, 9781484201428

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago