Answered step by step
Verified Expert Solution
Link Copied!

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 javaimage text in transcribed

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

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

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

3. Evaluate your listeners and tailor your speech to them

Answered: 1 week ago