Home Answers Viewqa Java-Beginners simple team leader

 
 


ashaanniegeorge
simple team leader
3 Answer(s)      a year and 5 months ago
Posted in : Java Beginners

Could you please help me to write a program for a simple team leader?

View Answers

November 28, 2011 at 4:38 PM


Please clarify your problem. Which type of program you want to create in java? Please specify this.


November 29, 2011 at 12:35 AM


A company has a file with records of employees name and team number. Each team has 5 members. The 3rd member of each team is the team leader. Write a program to read the records from this file and display the names of the teamleaders on the screen


November 29, 2011 at 4:59 PM


We have took 2 teams with 5 members each. Depend of which we have created the following code:

import java.io.*;
import java.util.*;

public class TeamLeader{
    public static void main(String []args) throws Exception{
    FileInputStream fstream = new FileInputStream("leader.txt");
    DataInputStream in = new DataInputStream(fstream);
    BufferedReader br = new BufferedReader(new InputStreamReader(in));
    String strLine;
    ArrayList list=new ArrayList();
    while((strLine = br.readLine()) != null){
    list.add(strLine);
    }
    String team1[]=new String[5];
    String team2[]=new String[5];
    Iterator itr;
    int k=0,p=0;
    for (itr=list.iterator(); itr.hasNext(); ){
    String str=itr.next().toString();  
    String [] splitSt =str.split(" ");
    String name="",num="";
      for (int i = 0 ; i < splitSt.length ; i++) {
      name=splitSt[0];
      num=splitSt[1];
          }
          if(Integer.parseInt(num)==1){
          team1[k]=name;
          k++;
          }
          if(Integer.parseInt(num)==2){
          team2[p]=name;
          p++;
          }
    }
    System.out.println("Team Leader of Team 1: "+team1[2]);
    System.out.println("Team Leader of Team 2: "+team2[2]);

    }
}









Related Pages:
simple team leader
simple team leader  Could you please help me to write a program for a simple team leader?   Please clarify your problem. Which type of program you want to create in java? Please specify
What it Takes to be a Leader
What it Takes to be a Leader     ... powerful word- leadership. Being a leader is not to be confused with being the boss. You can have a boss who fails as a leader. Similarly, you might have several
Simple problem to solve - JSP-Servlet
Simple problem to solve  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your kind and timely help for the program I have asked earlier. Its working in a fantastic way. My heartiest solute to Roseindia team
Simple problem to solve - JSP-Servlet
Simple problem to solve  Respected Sir/Madam, I am R.Ragavendran.. Thanks for your kind and timely help for the program I have asked earlier. Its working in a fantastic way. My heartiest solute to Roseindia team
Eclipse Plunging/Team Development
Eclipse Plunging/Team Development  ... utilized the many advanced capabilities provided through the "Team...; Insectivore: Team Task Sharing Insectivore: Team Task Sharinghttp
Common Interview Questions Page - 4
;    Question: 14. Are you a team player?  Answer: Working together as a team is the key point in achieving greater goal than... that you are a team player. You can present examples of your academics and athletics
Building a Simple EJB Application Tutorial
Building a Simple EJB Application - A Tutorial   ... works for Itreya Technologies, Bangalore, leading a team of over 10 programmers...)  Introduction In this tutorial we will create a simple session
Read Simple Excel(.xls) document using Apache POI
3.0, LOI , Team Leader 4.0, LKJ , Project Manager   ...Read Simple Excel(.xls) document using Apache POI In this section, you will learn how to read Excel file having .xls extension using Apache POI library
simple program
simple program  how to print * like triangle
Java Building a Simple Web Service ? A Tutorial Tutorial
Building a Simple Web Service ? A Tutorial..., leading a team of over 10 programmers and designers, developing a multi-user... In this tutorial we will create a simple web service and a client web application
simple pgm
simple pgm  a java program which uses super class
simple query
simple query  Write a stored procedure to retrieve a column which are less then or equal to that column using if statement
simple examples
simple examples  hi,we want to print a comma between two words we put comma in double quotes .Is it correct
Social Media Marketing Services India
Do you want to be the market leader or want to see your company in the elite... professionals who are efficient in their jobs. The team members in our SMM services.... We have set up a robust team of customer care executives who provide support you
simple eg
simple eg   <?php</li> $string = ?Hello Users?; print (?Welcome to Roseindia, I want to greet $string?); print (??); $string = ?Bye Bye!?; print (?OK meet you soon, $string?); ?> in this program we get a error at line
A Simple program
A Simple program  Hi I have written the following code: class FirstRectangle{ public int rectArea(int l,int b){ int farea = l*b; System.out.println("Required Area::"+farea); return farea
simple class in php
simple class in php  example of simple class in PHP
Simple FTP upload in Java
Simple FTP upload in Java  How to write a program for Simple FTP upload in Java? Any code example of Simple FTP upload in Java will be very helpful for me. Thanks
simple calculator program in javascript
simple calculator program in javascript  strong textsimple calculator in javascript
Simple JSP program
Simple JSP program  create a simple jsp page in which number is to be entered by user in jsp page and submit button clicked.If number entered is greater then 100,then message box "no is greater" elseif less "no is lesser
Simple Java Projects
Simple Java Projects  Hi, I am beginner in Java and trying to find Simple Java Projects to learn the different concepts on Java. Can anyone tell me where to get it? Thanks
simple calculator - Java Beginners
simple calculator  how can i create a simple calculator using java codes?  Hi Friend, Please visit the following link: http://www.roseindia.net/java/example/java/swing/calculator-in-swing.shtml Thanks
Simple Login(JSF)
Simple Login(JSF)  I have tried to run the Simple Login code provided using netbeans. It gives me error. CAn I run it using netbeans or need to config anything in order to run the prog
simple program question
simple program question  how do i get a java program to take an input from the user and have it terminate by a period and not by pressing enter
simple webdesign program with coding
simple webdesign program with coding  how to design a webpage using html   Please go through the following link: HTML Tutorials
Simple java applet
Simple java applet  Create a Java applet to display your address on the screen. Use different colors for background and text   Please visit the following link: Applet Examples
developing simple web service
/ About Axis: Apache Axis is an implementation of the Simple Object...: The Web Services Invocation Framework (WSIF) is a simple Java API
Run a simple EJB code
Run a simple EJB code  I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving... is acceptable). Thanks.   Please visit the following link: Simple EJB
Run a simple EJB code
Run a simple EJB code  I found the code this. However, as I have no idea with EJB, I can't understand how to run it. Can anybody help me by giving... is acceptable). Thanks.   Please visit the following link: Simple EJB
to find simple interst
to find simple interst  create a class of object insert with a constructor. write a program to find out simple interest   import java.util.... si=p*rate*t; System.out.println("Simple Interest: "+si); } public
simple java search engine
simple java search engine  i have already downloaded the project simple java search engine.but i am not able to run it.can anyone help me.i have.... ABSTRACT Title : Simple Search Engine System Specification: The system on which
simple javascript validation for numbers
simple javascript validation for numbers  simple javascript validation for register number   Here is a html code that accepts number from the user and check whether the entered value is valid. <html> <head>
Simple EJB3.0 - EJB
Simple EJB3.0  Hi friends... I am new user for this roseindia.net.. i am new for EJB3.0 also.. >>> my question is how to make session bean and how to access this session
Simple clarification - JSP-Servlet
Simple clarification  Respected Sir/Madam, Thanks for your immediate response..Sorry for troubling you again and again. So,you told that there is no possibility for getting my alert box in home page. Is there any other
Create a Simple Procedure
Create a Simple Procedure       Simple Procedure is a set of SQL statement which are executed... how to create a simple procedure. This procedure display all records of stu
Simple Question - JDBC
Simple Question  Respected Sir/Madam, I am R.Ragavendran.. Can I know the following syntax is valid or not? while(rs.next()) { <% <TR> } Because its not working for me.. It is throwing
WRITE a simple JSP
WRITE a simple JSP  Write a JSP that accepts a string parameter from the browser and simply displays it back in the HTML response   Hi Friend, Try the following code: 1)form.jsp: <html> <form name="form
simple code - Java Beginners
simple code  to input a number and check wether it is prime or not and print its position in prime nuber series.  Hi friend, Code to help in solving the problem : import java.io.*; class PrimeNumber { public
java spring simple application
java spring simple application  hai I have design a simple application in this I always found class not found exception. I am sendig code as follows please resolve this and send me.my directory structure is as follows Project
Error in simple session bean ..................
Error in simple session bean ..................  Hi friends, i am trying a simple HelloWOrld EJb on Websphere Applicatiopn server 6.1. Can any one plz help me to solve this issue. here is the client code which i have
A simple question - Java Beginners
A simple question   Design a program to calculate either the square of a number or the square root of a number and display the results. output should be like:- Enter a float value: 6.2 Do you want the (s)quare or square (r
Simple Editor
Java: Example - Simple Editor This simple text editor uses a JTextArea with Actions to implement the menu items. Actions are a good way... // editor/NutPad.java -- A very simple text editor -- Fred Swartz - 2004-08
Simple ATM Java Code...
Simple ATM Java Code...  You are required to write a Graphical User Interface that simulates an ATM by building on the program you wrote for the midterm exam. Specifically, you will be reading customer information into an array
SQL Simple LOOP
SQL Simple LOOP       Simple LOOP in Procedure is a series of statement that are executed.... Understand with Example The Tutorial illustrate an example from 'SQL Simple
How would you honestly evaluate the strengths and weaknesses of your previous/current company/boss/team?
previous/current company/boss/team?     ... is the least interested in the company/boss/team. They are simply checking how you... your current/previous boss/team/company behind their back, the interviewer
Example - Simple Calculator
Java: Example - Simple Calculator Here is the source for the simple...) - A simple main program. User interface (CalcGUI.java... place. Altho this simple example doesn't show the full power of separating
Simple Java Desktop Upload application
Simple Java Desktop Upload application  I try do simple example for upload applicationtake file from c:\ put to d:\ :) PLEASE HELP
Simple Types elements
There are two types of elements: 1. Simple Type 2. Complex Type Simple types... specification provides a lot of built-in simple data types and you can also derive your own simple types
Simple Form Controller Example
Example of using Simple Form Controller Page 2 In this page we will see the next steps necessary to run the example code.  Here... it at Example of using Simple Form Controller Step 7: Now we

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.