Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 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 GenericBoxStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started