Name: Anonymous 2014-02-03 11:37
Hi all , so i recently started Learning Java and I've only been learning for about a week now , came across this question and its killing me although I understand its probably easy for you guys , could you help me out ?
[ Here the Question ]
"Acorn Ltd wish to store the staff identification numbers(store as Strings) and corresponding department names, the departments in the company are as follows
Sales
Human Resources
IT
When a new member of staff joins the company the system requires their identification number which is input and the department which they are joining.
Write a program which will input and store details of new staff members. The program should ask the user how many new members are being processed in this run.
At the end of the run print out each employee’s number and department."
this is what I have so far " import java.util.Scanner;
public class AcornLtd {
public static void main (String [] args) {
Scanner in = new Scanner (System.in);
int numStaff ;
System.out.println("Enter the Number of Individuals Being Processed");
numStaff = in.nextInt();
String[]ids = new String [numStaff];
String[]dep = new String [3];
for(int count=0; count<numStaff; count++) {
System.out.println("Enter the Individuals ID Number/Number's" + ( count + 1 ) );
ids[count] = in.next();
System.out.println("Enter the Department They Are Joining Sales, Human Resources, IT");
dep[count] = in.next();
}}}"
Nothing too complicated as I am using Dr.Java as a beginner
[ Here the Question ]
"Acorn Ltd wish to store the staff identification numbers(store as Strings) and corresponding department names, the departments in the company are as follows
Sales
Human Resources
IT
When a new member of staff joins the company the system requires their identification number which is input and the department which they are joining.
Write a program which will input and store details of new staff members. The program should ask the user how many new members are being processed in this run.
At the end of the run print out each employee’s number and department."
this is what I have so far " import java.util.Scanner;
public class AcornLtd {
public static void main (String [] args) {
Scanner in = new Scanner (System.in);
int numStaff ;
System.out.println("Enter the Number of Individuals Being Processed");
numStaff = in.nextInt();
String[]ids = new String [numStaff];
String[]dep = new String [3];
for(int count=0; count<numStaff; count++) {
System.out.println("Enter the Individuals ID Number/Number's" + ( count + 1 ) );
ids[count] = in.next();
System.out.println("Enter the Department They Are Joining Sales, Human Resources, IT");
dep[count] = in.next();
}}}"
Nothing too complicated as I am using Dr.Java as a beginner