Add the numbers 3 through 10 to the hashtable

Assignment Help Software Engineering
Reference no: EM13948408

We are working on hashtables and I am trying to figure out a real life example that could be solved with hashtables to jtree as well as some type of array or jlist. I just need some opinions or examples of this part please.

Here is an exercise I do not understand in this chapter.

Observe the following code, which creates a simple hashtable.
// Demonstrate a Hashtable
import java.util.*;
class HTDemo
{
public static void main(String args[])
{
Hashtable<String,Integer> numbers = new
Hashtable<String,Integer>();

numbers.put("one", new Integer(1));
numbers.put("two", new Integer(2));

}
}

Starting with this provided code, add the following functionality:

1. Add the numbers 3 through 10 to the hashtable continuing in the same manner as shown.

2. Prompt the user for a string, and display the corresponding number. For example, if the user types "five", the program would output "5". This must be done using the hashtable as created in the previous step.

3. Using a loop and a single printlng statement, display all of the values (both strings and integers) in a table.

Reference no: EM13948408

Questions Cloud

Dornbusch model under perfect foresight : Consider the following Dornbusch model under perfect foresight
Compare an aspect of the systems : Compare an aspect of the systems or arrangements for the protection of children from maltreatment in TWO countries, legal jurisdictions or regions.
System into deviations from the fixed point : (i) Find the fixed point. (ii) Transform the system into deviations from the fixed point. What are the characteristic roots of this transformed system? (iii) Derive the equations for the stable and unstable arms.
Compute the roi for the coming year : Suppose that the average operating assets of the Components Division total $10 million. Compute the ROI for the coming year, assuming that the 50,000 units are transferred to the Goods Division for $21 each.
Add the numbers 3 through 10 to the hashtable : We are working on hashtables and I am trying to figure out a real life example that could be solved with hashtables to jtree as well as some type of array or jlist. I just need some opinions or examples of this part please.
What is intrapreneurship and how is it best enabled : Who Is The Entrepreneur? In your text, the top right-hand quadrant defines an entrepreneur as being one who has high creativity and innovativeness but not necessarily high management skills and business know-how, What is intrapreneurship and how i..
Problem regarding the saddle-point solutions : Verify that the following two systems have saddle-point solutions at the origin
Establish the fixed point : (i) Establish the fixed point. (ii) Derive the equations for the two isoclines and establish the vector of forces. (iii) Derive the equation for the stable and unstable arms.
Wireless solution for a sporting goods company : The objective of the project is to recommend a wireless solution for a sporting goods company. This is an individual project. You will be required to submit two assignments for the project. Because of this, you may need to spend additional time an..

Reviews

Write a Review

 

Software Engineering Questions & Answers

  Preparing a short video clip

Create a short video clip on some topic from your chosen multimedia assignment. Do the same for a short 3D animation using Blender on a different topic.

  Calculating a discount that customers receive

Computing a discount that consumers receive based on the value of their order. If the total value ordered is less than $20, no discount will be given.

  Describe the primary sdlc methodologies

The System Development Life Cycle has constructed over the decades to include a variety of Methodologies. Each of these Methodologies utilizes same processes in a different way.

  Identify trends in mobile software development

Identify trends in mobile software development and explain why they are relevant to the scenario described above. Explain how the different mobile platform will affect the different phases of requirements, design, development, and deployment of the m..

  Performing a feasibility analysis

How do you determine whether a project is one your development team should consider? Performing a feasibility analysis enables you to figure that out. In this Application, you use a non-IT scenario to practice this important skill.

  Task no1 cultural differencecultural comparisonsselect one

task no.1 cultural differencecultural comparisonsselect one other country and make a comparison with your own

  Importance of professional looking worksheets

Discuss and explain in Excel why is it important to have a professional looking worksheet? Why spend so much time with styles and formats and creating borders?

  Office automation and group collaboration software

Create a paper explaining what office automation and group collaboration software is used in your company. Include an review of the drawbacks and benefits of each software used.

  How to ensure information systems security issues

How can the CISO and CISO staff members help to ensure that the BCP process appropriately addresses information systems security issues

  Recognise the importance of content and instructional design

Following the System Development Life Cycle (SDLC) you are required to plan and scope your project and provide a detailed report of your plan - see Topic 2 and associated readings.

  Deisgn risk assessment policy that identifies risks

Deisgn Risk Assessment Policy, that identifies risks associated with an organization's infrastructure. A risk assessment template may be downloaded from Sans: http://www.sans.org/resources/policies/#template

  Draw e-r diagram for courses offered by college

Prerequisite for any number of courses, or may not be prerequisite for any other course. Draw an E-R diagram for this situation. Clearly state the assumptions made.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd