Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ineed a short simple java code :) Exercise 1 Given (name, number) pairs A={(Bob,4), (Amber, 5), (George, 3), (Will, 7)}, write a Java class with

ineed a short simple java code :)
image 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: "" 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_2

Step: 3

blur-text-image_3

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

Intelligent Information And Database Systems Second International Conference Acids Hue City Vietnam March 2010 Proceedings Part 1 Lnai 5990

Authors: Manh Thanh Le ,Jerzy Swiatek ,Ngoc Thanh Nguyen

2010th Edition

3642121446, 978-3642121449

More Books

Students also viewed these Databases questions

Question

1. Why do people tell lies on their CVs?

Answered: 1 week ago

Question

2. What is the difference between an embellishment and a lie?

Answered: 1 week ago