Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: HELP!!!!!!!!!!!!!!!!!!!!!

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question HELP!!!!!!!!!!!!!!!!!!!!!

    A Company has contracted you to develop a Java program to determine who is eligible to attend. They have decided to only admit board members who have paid their charity contributions in full and attended at least two subcommittee meetings. Display the contents of the database first. The chairperson of the board, Becky Caldwell, wants an alphabetical list of board members ineligible to enter the board meeting and reason(s) why they cannot attend. The chairperson would also like a printed alphabetized list of board members who were eligible to attend, the total amount that Caldwell Diversified Holdings contributed to charitable organizations, and the amount of pledges owed.

    and here is wat i have done so far..

    import java.text.DecimalFormat;
    import java.util.Scanner;
     
     
    public class CHDmeeting
    {
    // Declaration of array's 
    private String[] Name1; // Name
    private int[] Meetings1; //Number of Meetings Atteded
    private int[] Pledge1; //Pleadge Amount
    private int[] PBalance1; //Balancce of the Pleadge 
    private int[] Eligible = new int[11];
    private int counter = 0;
    private int[] assign = new int [11];
     
    Scanner keyboard = new Scanner(System.in);
     
    /**
    * Constructor for objects of class CHDmeeting
    */
    public CHDmeeting(String[] n, int[] m, int[] p, int[] b, int[] e)
    {
    // array's 
    Name1 = new String[n.length];
    Meetings1 = new int[m.length];
    Pledge1 = new int[p.length];
    PBalance1 = new int[b.length];
    Eligible = new int[e.length];
     
    for (int index2 =0; index2 <11; index2++)
    { 
    Name1[index2] = n[index2];
    Meetings1[index2] = m[index2];
    Pledge1[index2] = p[index2];
    PBalance1[index2] = b[index2];
    Eligible[index2] = e[index2];
    }
    }
     
    public void CHDmeeting()
    {
    for(int index3 = 0; index3 < Name1.length; index3++)
    {
    if (PBalance1[index3] == Pledge1[index3] && Meetings1[index3] >= 2)
    Eligible[index3] = 1;
    else Eligible[index3] = 2;
    }
    }
    public void display()
    {
    for(int index4 =0; index4 < Name1.length; index4++)
    {
     
    if (Eligible[index4] == 1)
    {
    System.out.print("Your pledge has been paid in and you have been to 2 or more meetings. You can attend");
    System.out.print(Name1[index4]+ " " + Meetings1[index4]+ " " + Pledge1[index4]+ " " + PBalance1[index4]);
    }
    if (Eligible[index4] == 2)
    {
    System.out.print("You may not attend the meeting due to your pledge not being paid or attend less than 2 meetings");
    System.out.print(Name1[index4]+ " " + Meetings1[index4]+ " " + Pledge1[index4]+ " " + PBalance1[index4]);
    }
    }
     
    // jtaOutput.setText("" + alphaList(dataList)); 
     
    // public void List() alphaList(ArrayList<Eligible> dataList)
    // { 
    // Object[] Eligible = new Object[]{Eligible.toArray()}; 
    // List<Object> list = Arrays.asList(dataArray); 
    // Collections.sort(list); 
    // return list; 
    // } 
    //end alphaList 
    }
    //=========================================
    // public static void main (String[]args) throws Exception
    // {
    // Scanner scan = new Scanner (System.in);
    // System.out.println("Eligible Board Members:");
    // String file1 = scan.nextLine();
    // Meetings1 filer = new Meetings1(file1);
     
     
    // System.out.println(filer.displayHead());
     
    // }
    //========================================= 
    // public static void main(String[] args) {
    //... 1. Sort strings - or any other Comparable objects.
    //String[] names = {"Zoe", "Alison", "David"};
    //Arrays.sort(names);
    //System.out.println(Arrays.toString(names));
     
    public void total()
    {
    for(int index5 =0; index5 <Pledge1.length; index5 ++)
    {
    if(assign[index5] !=0)
    counter++;
    }
    System.out.println("Total Pledge Owed:"+ counter);
    }
    }
     
    -----------------------------------------------------------------------------
    Demo
    -----------------------------------------------------------------------------
    import java.io.*;
    import java.util.StringTokenizer;
     
    public class CHDmeetingDemo
    {
    public static void main(String[] args) throws IOException
    {
    int stock_holders = 11; 
    String[] Meeting = new String[stock_holders];
    String[] Name = new String[stock_holders];
    int[] Meetings = new int[stock_holders];
    int[] Pledge = new int[stock_holders];
    int[] PBalance = new int[stock_holders];
    String input;
    FileReader freader = new FileReader("Readme.txt"); 
    BufferedReader inputFile = new BufferedReader(freader);
     
    for (int index =0; index < stock_holders; index++)
    {
    Meeting[index] = inputFile.readLine();
    }
    inputFile.close();
    for (int index = 0; index < Meeting.length; index++)
    {
    StringTokenizer strTokenizer = new StringTokenizer(Meeting[index], " ");
    {
    Name[index] = strTokenizer.nextToken();
    Meetings[index] = Integer.parseInt(strTokenizer.nextToken());
    Pledge[index] = Integer.parseInt(strTokenizer.nextToken());
    PBalance[index] = Integer.parseInt(strTokenizer.nextToken());
    input = strTokenizer.nextToken();
    }
    }
     
    // CHDmeeting = new CHDmeeting(Name, Meetings, Pledge, PBalance, Eligible);
     
    System.out.println("StockHolders");
    for(int index =0; index < Name.length; index++)
    {
    System.out.println(Name[index]+ " " + Meetings[index] + " " + Pledge[index] + " " + PBalance[index]);
    System.out.println();
    }
     
    }
     
    }

  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: HELP!!!!!!!!!!!!!!!!!!!!!

    First, there is no reason to 'shout'. Second, the generic post name and use of exclamation points is a good way to have folks look right past your post. Third, is there a question associated with this? Lastly, suggested reading: How to ask questions

  3. The Following User Says Thank You to copeg For This Useful Post:

    Json (April 19th, 2011)

  4. #3
    Member
    Join Date
    Jul 2010
    Location
    Washington, USA
    Posts
    307
    Thanks
    16
    Thanked 43 Times in 39 Posts

    Default Re: HELP!!!!!!!!!!!!!!!!!!!!!

    HELP!!!!!!!! Will not be given to you...