Question: by java Exercise 1 Given (name, number) pairs A={(Bob,4),(Amber,5), (George, 3), ( Will, 7) }, write a Java class with method for: (1) inserting these

by javaby java Exercise 1 Given (name, number) pairs A={(Bob,4),(Amber,5), (George, 3), (

Exercise 1 Given (name, number) pairs A={(Bob,4),(Amber,5), (George, 3), ( Will, 7) }, write a Java class with method for: (1) inserting these pairs into a pair of Arraylist structures called NameAl and NumberAL (2) displaying the pairs to the screen as "My name is: " enames "and I am in Year " enumbers" at University." You can choose what to name your class and method, but your solution should form a complete class that can be compiled. Create another class for testing the pair class. Exercise 2: Write a class called GenericBox, which takes a generic type parameter E, holds a content of type E. The constructor, getter and setter work on the parameterized type E. The tostring( ) reveals the actual type of the content. The following class tests the class GenericBox

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!