Page 2 of 2 FirstFirst 12
Results 21 to 26 of 26
  1. #21
    Join Date
    Mar 2009
    Posts
    51
    Rep Power
    0

    Default

    Java Code:
    package pack3;
    import pack1.*;
    import pack2.*;
    import java.util.*;
    public class user extends pack2.admin
    {
     Scanner s=new Scanner(System.in);
     public int i,choice;
     admin a=new admin();
     //book b[]=new b();
     public void staff()
     {
      System.out.println("1.Search\n2.Lending\n3.Returning\n4.Display");
      System.out.println("Enter the choice:");
       choice=Integer.parseInt(s.nextLine());
      switch(choice)
      {
       case 1:
         a.search();
       break;
       case 2:
       System.out.println("Enter the number of books you want to lend:");
       int le=Integer.parseInt(s.nextLine());int m=5;
       for(int i=0;i<le;i++)
       a.lending(i,m);
       break;
       case 3:
        
       a.returning();
       break;
       case 4:
       System.out.println("Enter the access number of the book:");
       i=0;
        while(b[i].acc!=acc1)
        {
        b[i] = new book();
        i=i+1;
        }
         if(i<bookno) 
        {
         System.out.println("The details of the book is:");
         b[i].display();
        }
         break; 
       default:
       System.out.println("wrong choice");
     }
    }
    
      public void student()
      {
      System.out.println("1.Search\n2.Lending\n3.Returning\n4.Display");
      System.out.println("Enter the choice:");
       choice=Integer.parseInt(s.nextLine());
      switch(choice)
      {
       case 1:
       a.search();
       break;
       case 2:
       System.out.println("Enter the number of books you want to lend:");
       int le=Integer.parseInt(s.nextLine());int m=3;
       for(int i=0;i<le;i++)
       a.lending(i,m);
       break;
       case 3:
       System.out.println("Enter the numebr of books you want to return:");
       int re=Integer.parseInt(s.nextLine());
       for(int i=0;i<re;i++)
       a.returning();
       break;
       case 4:
       System.out.println("Enter the access number of the book:");
       i=0;
        while(b[i].acc!=acc1)
        b[i] = new book();
        i=i+1;
         if(i<bookno)
         System.out.println("The deatails of the book is:");
       b[i].display();
       break; 
       default:
       System.out.println("wrong choice");
     }
    }
    }
    this is a pack3 where i am just using switch statement to go to the particular method in pack2

  2. #22
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    OK, too many threads on the same subject... I'm bailing out.

  3. #23
    Join Date
    Mar 2009
    Posts
    51
    Rep Power
    0

    Default

    ok you dont have concern for a starter..i am just a starter you dont feel like helping me out thanks..if u dont want to solve such a thing then it is better you stop your forum site

  4. #24
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    You have two separate active threads for the same question, which means you're asking folks to do duplicate effort here, which is showing disrespect for those helping you for free. You'd better close one thread and stick to the other, or many will not help you.

  5. #25
    Join Date
    Mar 2009
    Posts
    51
    Rep Power
    0

    Default

    okk fine u help me out i am almost fed up and in the state of crying

  6. #26
    Join Date
    Mar 2009
    Posts
    51
    Rep Power
    0

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Tell me jar file for library library org.bouncycastle.cms
    By 82rathi.angara in forum New To Java
    Replies: 10
    Last Post: 09-09-2008, 06:11 AM
  2. Asbru Web Content Management 6.7.1
    By Java Tip in forum Java Software
    Replies: 0
    Last Post: 04-01-2008, 05:14 PM
  3. Project management tool
    By Sudha in forum New To Java
    Replies: 0
    Last Post: 01-23-2008, 08:56 PM
  4. Asbru Web Content Management 6.6
    By JavaBean in forum Java Software
    Replies: 0
    Last Post: 09-26-2007, 01:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •