Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Managing Multiple User Input Data in an Array (or ArrayList)
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Ram Ezra
Managing Multiple User Input Data in an Array (or ArrayList)
1 Answer(s)      4 years and 4 months ago
Posted in : Java Beginners


Hey there! I need to make a code of an employee record. Here's how it should work: (1) Display a menu of choices: a) choice 1 -> add employee a.1) employee name a.2) employee age a.3) employee phone number b) choice 2 -> Delete employee record(s) c) Choice 3 -> Sort employee record alphabetically

(2) If user chooses choice1, the input data is stored in an ARRAY (or ARRAYLIST) until the user chooses to stop inputting data.

Kindly help me. I don't know whether to use multi-dimensional ARRAYS (or ARRAYLIST) for this. Specifically, I don't know how I'm gonna store the STRING (employee name) data with the INTEGER (employee age/phone number) data.

Thank you very, very much in advance!


Advertisement
View Answers

December 13, 2010 at 6:20 PM


I am re-typing my question so our Java Masters out there can understand clearly what I was asking help about.

Hey there! I need to make a code of an employee record.

Here's how it should work:

(1) Display a menu of choices:

a) choice 1 -> add employee 
  a.1) employee name 
  a.2) employee age 
  a.3) employee phone number 
b) choice 2 -> Delete employee record(s)
c) Choice 3 -> Sort employee record alphabetically

(2) If user chooses choice1, the input data is stored in an ARRAY (or ARRAYLIST) until the user chooses to stop inputting data.

Kindly help me. I don't know whether to use multi-dimensional ARRAYS (or ARRAYLIST) for this. Specifically, I don't know how I'm gonna store the STRING (employee name) data with the INTEGER (employee age/phone number) data.

Thank you very, very much in advance!

Additionally, kindly educate me about Parallel Sorting of the data for the Array (Name and phone numbers). I couldn't do it..



Related Tutorials/Questions & Answers:
Managing Multiple User Input Data in an Array (or ArrayList)
Managing Multiple User Input Data in an Array (or ArrayList)  Hey... record alphabetically (2) If user chooses choice1, the input data is stored in an ARRAY (or ARRAYLIST) until the user chooses to stop inputting data. Kindly
Save the input data until user get changed
Save the input data until user get changed  I would like to know how to store the give input data and perform the calculations even after re-opening the program. I am developing a college library management system, i would like
Advertisements
Save the input data until user get changed
Save the input data until user get changed  I would like to know how to store the give input data and perform the calculations even after re-opening the program. I am developing a college library management system, i would like
Save the input data until user get changed
Save the input data until user get changed  I would like to know how to store the give input data and perform the calculations even after re-opening the program. I am developing a college library management system, i would like
Array and input
to input one of the above numbers then i want to print the array without the number user input. how will i do tht...Array and input  if this is my array int briefcases
Remove multiple elements in arraylist
Remove multiple elements in arraylist   how can we remove multiple values in arrayList? only remove method we used for single remove.but i want to delete multiple value in arrayList
escaping user input in php
escaping user input in php  Is it possible to escape the user input while submitting data into database in PHP
need help with two dimensional array that takes input from user and bubble sorts and selections sorts
need help with two dimensional array that takes input from user and bubble... how many elements are going to be input by the user?   Here is a code... cannot figure out how i can declare a two dimensional array without knowing how
Creating Multiple ArrayList
Creating Multiple ArrayList   I want to create multiple ArrayList . import java.util.*; class ArrayListNames{ public static void main(String args[]){ //here i want to create 10 arraylists of type string
button to accept user input
the radiobutton and spinner.The user input does not show on my Studentinfo.mdb...button to accept user input  private void jButton1ActionPerformed... that accepts firstname, lastname and gender from user and insert to database
Java User Input
Java User Input  I am using Scanner class for user Input. Scanner s = new Scanner(System.in); String name = s.next(); but i am unable to store full name in name variable...how i can store full name plsss reply   use
user input to database
user input to database  /* * Studentinfo2App.java */ package studentinfo2; import java.sql.Connection; import java.sql.DriverManager; import... in my database user input from my applet does not show
user input to database
user input to database  /* * Studentinfo2App.java */ package studentinfo2; import java.sql.Connection; import java.sql.DriverManager; import... in my database user input from my applet does not show
user input to database
user input to database  /* * Studentinfo2App.java */ package studentinfo2; import java.sql.Connection; import java.sql.DriverManager; import... in my database user input from my applet does not show
calculation after if. user input
user input????   My apologies good evening peoples Once again I am...calculation after if. user input  System.out.print ("please select...[]args){ Scanner input=new Scanner(System.in); System.out.print
Convert ArrayList to Array
In this section, you will learn about converting ArrayList to Array
Convert Array to ArrayList
In this section, you will learn about converting Array into ArrayList
java user input - Java Beginners
java user input  how to input from keyboard? please give a example.  Hi Friend, There are lot of ways to input data from keyboard.You...:****** try{ System.out.print("Enter String:"); BufferedReader input = new
How to read user input in C++
How to read user input in C++  How can i get an input from the users in C++?   You can use the standard input "cin" to get the input from user.. For example: int age; cin >> age
error in taking input from user.
error in taking input from user.  //i m having problem inputting the array from user.my program is import java.io.*; class bubble { public static...("Sorted Array: "); for(int i=0;i<a.length;i
Indexed Array in AS3
.style1 { font-size: medium; } Indexed Array in Action Script3:- If user want to store multiple value in a single data structure then it can be used...:Application> Array class instance can hold  different types of data type
Data input & output Stream
Data input & output Stream  Explain Data Input Stream and Data Output Stream Class.   DataInputStream and DataOutputStream A data input stream lets an application read primitive Java data types from an underlying input
user input in java - Java Beginners
user input in java   i am trying to write a code to compute the average of 5 numbers but i dont know what to do for the program to accept user input  Hi import java.util.*; public class AverageExample { public
Java arraylist to array
Java arrayList has method toArray() It converts the given list into the array of Object. It needs to be casted to the required data type. Then it can be used properly. Example of Java Arraylist to Array import
A connection pool with multiple user ID.
A connection pool with multiple user ID.  Can I set up a connection pool with multiple user IDs? The single ID we are forced to use causes problems when debugging the DBMS
How to take input by user using jDialogue and use that input
How to take input by user using jDialogue and use that input  I am... this button a dialogue box appear which take employee_id as input from user . then that input be used for fethcing data from the database ( desired table in DB
Java get User Input
Java get User Input       In this section, you will learn how to get the user input from... that will communicate with the user at the command line and returns the user input. We have
Data from multiple ResultSets?
Data from multiple ResultSets?  hello, How can I get data from multiple ResultSets?   Hi, You can iterate the ResultSet separately and get the required data. Thanks
to read data stored in ArrayList - Struts
to read data stored in ArrayList  this is regarding struts2, i have create one ArrayList object and in that i have stored 4 User class objects taking them from database. Now i want to read the data of all 4 User objects from jsp
Display PHP clock with user input date and time
Display PHP clock with user input date and time  The following PHP code displays a clock with current date and time. I want the clock to receive user input date and time. How can this be done? <?php date<em>
XP Bowling Game User input help
XP Bowling Game User input help  I was asked to do the XP Bowling Example as an assignment. I have the programme passing all tests, but now I need to make the code accept input from a user and display the scores/frames
 

 

 

DMCA.com