Results 1 to 7 of 7
  1. #1
    Join Date
    May 2015
    Posts
    2
    Rep Power
    0

    Default please how can i add methods that in attachments?

    hi this is my first test in java please help me to compleat it..

    Java Code:
    package methods;
    import java.util.*;
    
    import javax.swing.*;
    public class Methods {
    	 
    	public static void main(String[] args) {
    		// TODO Auto-generated method stub
    		
    		char choicee2;
    		int count1=0;
            int count2=0;
            int count3=0;
            
    	    char choice1;
    	    int choice;
    	    int adults, children,infants, weight,adults1, children1,infants1, weight1,adults2, children2,infants2, weight2,adults3, children3,infants3, weight3,
    	    adults4, children4,infants4, weight4,adults5, children5,infants5, weight5,adults11, children11,infants11, weight11,adults22, children22,infants22, weight22,
    	    adults33, children33,infants33, weight33,adults44, children44,infants44, weight44,adults55, children55,infants55, weight55,
    	    adults66, children66,infants66, weight66,adults77, children77,infants77, weight77;
    	    
    	    double AdultCost=0; 
            double ChildCost=0; 
            double infantCost=0; 
            double TicketsCost=0;
            double allowedWeight=0;
            double ExtraWeightCost=0;
    
            allowedWeight=0;  
            ExtraWeightCost=0 ;
            double Totalcost=0;
    	    
    	    double AdultCost1 =0; 
            double ChildCost1 =0; 
            double infantCost1=0; 
            double TicketsCost1=0;
            double allowedWeight1=0;
            double ExtraWeightCost1=0;
            allowedWeight1= 0;
            ExtraWeightCost1=0 ;
            double Totalcost1=0;
    	    
            double AdultCost2 = 0; 
            double ChildCost2 = 0; 
            double infantCost2=0; 
            double TicketsCost2= 0;
            double allowedWeight2=0;
            double ExtraWeightCost2=0;
            allowedWeight2= 0;
            ExtraWeightCost2=0 ; 
            double Totalcost2=0;
            
            double AdultCost3 = 0; 
            double ChildCost3 = 0; 
            double infantCost3=0; 
            double TicketsCost3=0;
            double allowedWeight3=0;
            double ExtraWeightCost3=0;
            allowedWeight3=0;
            ExtraWeightCost3=0; 
            double Totalcost3=0;
    
            double AdultCost4 = 0; 
            double ChildCost4 = 0; 
            double infantCost4= 0; 
            double TicketsCost4= 0;
            double allowedWeight4=0;
            double ExtraWeightCost4=0;
            allowedWeight4= 0;
            ExtraWeightCost4= 0 ; 
            double Totalcost4=0;
            double AdultCost5 = 0; 
            double ChildCost5 = 0; 
            double infantCost5= 0; 
            double TicketsCost5= 0;
            double allowedWeight5=0;
            double ExtraWeightCost5=0;
            allowedWeight5= 0;
            ExtraWeightCost5= 0 ; 
            double Totalcost5=0;
            
            double Adult_Cost = 0; 
            double Child_Cost = 0; 
            double infant_Cost= 0; 
            double Tickets_Cost= 0;
            double allowed_Weight=0;
            double Extra_WeightCost=0;
         
            double Total_Cost=0;
    
            double Adult_Cost1 = 0; 
            double Child_Cost1 = 0; 
            double infant_Cost1= 0; 
            double Tickets_Cost1= 0;
            double allowed_Weight1=0;
            double Extra_WeightCost1=0;
            double Total_Cost1=0;
            
                 double Adult_Cost2 = 0; 
                 double Child_Cost2 = 0; 
                 double infant_Cost2= 0; 
                 double Tickets_Cost2=0;
                 double allowed_Weight2=0;
                 double Extra_WeightCost2=0;
    
                
                 double Total_Cost2=0;
    
                 
                 double Adult_Cost3 = 0; 
                 double Child_Cost3 = 0; 
                 double infant_Cost3= 0; 
                 double Tickets_Cost3=0;
                 double allowed_Weight3=0;
                 double Extra_WeightCost3=0;
    
                double Total_Cost3=0;
    
                double Adult_Cost5 =0; 
                double Child_Cost5 =0; 
                double infant_Cost5= 0; 
                double Tickets_Cost5= 0;
                double allowed_Weight5=0;
                double Extra_WeightCost5=0;
    
                double Tickets_Cost6=0;
    			double Extra_wight_cost=0;
    			double Total_Cost6=0;
                double Total_Cost5=0;
                 
                
                double Adult_Cost4 = 0; 
                double Child_Cost4 =0; 
                double infant_Cost4= 0; 
                double Tickets_Cost4= 0;
                double allowed_Weight4=0;
                double Extra_WeightCost4=0;
    
                double Total_Cost4=0;
                
    
                
    	    int   Price_for_adult=0, price_for_infants=0,price_for_children=0;
    	    Scanner input= new Scanner(System.in);
    	    int command=JOptionPane.YES_OPTION;
    
      while(command==JOptionPane.YES_OPTION){
    
    		    System.out.println("	------------------------------------------------");
    	    System.out.println("	Welcome to Airlines Office Agent System");
    	    System.out.println("	------------------------------------------------");
    	
    	    //use loops
    		
    	   
    	   do{//for s,n,,o
    	    System.out.println(" Press S for Saudi Airlines ");
    	    System.out.println(" Press N for FlyNas Airlines");
    	    System.out.println(" Press O for Other Airlines");
    	    System.out.print(" Enter the Choice: ");
    	    choice1 =input.next().charAt(0);
    	    System.out.println(" ");
    		switch (choice1){
    
    		case 's':
    		case 'S':
    		{count1++;
    			do{//for 0,1 for s
    			System.out.println(" Press 0 for Local Destination");
    		    System.out.println(" Press 1 for Abroad Destination");
    		    System.out.print(" Enter the Choice: ");
    		    choice=input.nextInt();
    		    System.out.println (" ");
    		    switch (choice){
    		    case 0:
    		    {
    		    	do{// for g,b,f for s
    		    	  System.out.println(" Press G for Guest Class");
    			      System.out.println(" Press B for Business Class");
    			      System.out.println(" Press F for First Class ");
    			      System.out.print (" Enter Choice:");
    		   	      choicee2=input.next().charAt(0);	
    		   	      System.out.print(" ");
    
    		   	   switch (choicee2){
    		   	    case 'g':
    		        case 'G':{
    		        	System.out.println("Enter Passport Number: ");
    			        int pass=input.nextInt();
    			        System.out.println(" Enter Name:");
    			        String  name=input.next();
    			    //do for max number is four
    			      do{ 
    			    	   
    			       do{
    			    	   
    			        do{
    			    	   System.out.print(" Enter Number of Adults: ");
    			         adults=input.nextInt();
    			        if (adults>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			       }while (adults>4);
    			        System.out.print(" Enter Number of Children: "); 
    			        children =input.nextInt();
    
    			        if ((adults+children)>4){	
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			       }while((adults+children)>4);
    			        System.out.print(" Enter Number of Infants: ");
    			        infants=input.nextInt();
    		            if (adults+children+infants>4){
                           System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    
    			     }
    			     }while (adults+children+infants>4);
    		            System.out.print("Enter total of wieghts:");
    			        weight =input.nextInt();
    
    		         		        	
    			        	//calculate the total cost for guest tickets
    	           AdultCost = 200; 
    	           ChildCost = AdultCost*50/100; 
    	           infantCost= AdultCost*10/100; 
    	           TicketsCost= (AdultCost*adults+ChildCost*children+infantCost*infants);
    	           allowedWeight=  adults*30+children*20+infants*10;  
    	            ExtraWeightCost= (weight-allowedWeight) ;
    	            if( ExtraWeightCost>0)
    	            	ExtraWeightCost=ExtraWeightCost*10;
    	            else ExtraWeightCost=0;
    	            Totalcost=(TicketsCost+ExtraWeightCost);
    	            
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+name+"\t\t\t"+"Passport number:"+pass);
    				      System.out.println("\t\t\t\tTickets Cost:"+TicketsCost);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ ExtraWeightCost);
    				      System.out.println("\t\t\t\tTotal Cost:"+Totalcost);
    				      System.out.println("====================================================");
    
    		            
    			        
    			 
    			        	
    		        	
    		        	
    			       
    
    		        }//نهاية جي
    			       
    			       break;
    			       
    		        case 'f':
    		        case 'F':{
    		        	
    		        	System.out.println(" Enter Passport Number: ");
    			        int pass1=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  name1=input.next();
    			    do{
    			    	do{
    			    		do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults1=input.nextInt();
    			        if (adults1>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			    }while (adults1>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children1 =input.nextInt();
    			        if ((adults1+children1)>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			    } while ((adults1+children1)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants1=input.nextInt();
    		            if (adults1+children1+infants1>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    			    }  while(adults1+children1+infants1>4);
    		            System.out.print("Enter total of wieghts:");
    			        weight1 =input.nextInt();
    
    		         		        	
    			        	//calculate the total cost for first class tickets
    		            AdultCost1 = 800; 
    		           ChildCost1 = AdultCost1*80/100; 
    		           infantCost1= AdultCost1*50/100; 
    		           TicketsCost1= (AdultCost1*adults1+ChildCost1*children1+infantCost1*infants1);
    		            allowedWeight1=0;
    		            ExtraWeightCost1=0;
    		           allowedWeight1= adults1*30+children1*20+infants1*10;
    		           ExtraWeightCost1= (weight1-allowedWeight1);
    		           if( ExtraWeightCost1>0)
    		            	ExtraWeightCost1=ExtraWeightCost1*10;
    		            else ExtraWeightCost1=0;
    
    		           Totalcost1=(TicketsCost1+ExtraWeightCost1);
    		           
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+name1+"\t\t\t"+"Passport number:"+pass1);
    				      System.out.println("\t\t\t\tTickets Cost:"+TicketsCost1);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ ExtraWeightCost1);
    				      System.out.println("\t\t\t\tTotal Cost:"+Totalcost1);
    				      System.out.println("====================================================");
    
    			        	
    			        	
    			        	
    			        	
    		        	
    		        	
    		        	
    		        } // نهاية اف
    		        break;
    		        case 'b':
    		        case 'B':{
    		        	
    		        	System.out.println(" Enter Passport Number: ");
    		            int pass2=input.nextInt();
    		            System.out.println("Enter Name:");
    		            String  name2=input.next();
    		            do{
    				    	do{
    				    		do{
    
    		            
    		            System.out.print("Enter Number of Adults: ");
    		            adults2=input.nextInt();
    		            if (adults2>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    				   	}while (adults2>4 );
    		            System.out.print("Enter Number of Children: "); 
    		            children2 =input.nextInt();
    		            if ((adults2+children2)>4){	
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    				    }while((adults2+children2)>4);
    		            System.out.print("Enter Number of Infants: ");
    		            infants2=input.nextInt();
    		            if (adults2+children2+infants2>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    		            }while(adults2+children2+infants2>4);
    		            System.out.print("Enter total of wieghts:");
    		            weight2 =input.nextInt();
    
    		         		        	
    		            	//calculate the total cost for business tickets
    		           AdultCost2 = 500; 
    		            ChildCost2 = AdultCost2*60/100; 
    		          infantCost2= AdultCost2*30/100; 
    		           TicketsCost2= (AdultCost2*adults2+ChildCost2*children2+infantCost2*infants2);
    		            allowedWeight2=0;
    		          ExtraWeightCost2=0;
    		           allowedWeight2= adults2*30+children2*20+infants2*10;
    		           ExtraWeightCost2= (weight2-allowedWeight2) ; 
    		           if( ExtraWeightCost2>0)
    		            	ExtraWeightCost2=ExtraWeightCost2*10;
    		            else ExtraWeightCost2=0;
    
    		          Totalcost2=(TicketsCost2+ExtraWeightCost2);
    
    		           
    		           
    		    	      System.out.println("=====================================================");
    		    	      System.out.println("Name:"+name2+"\t\t\t"+"Passport number:"+pass2);
    		    	      System.out.println("\t\t\t\tTickets Cost:"+TicketsCost2);
    		    	      System.out.println("\t\t\t\tExtra Weight cost:"+ ExtraWeightCost2);
    		    	      System.out.println("\t\t\t\tTotal Cost:"+Totalcost2);
    		    	      System.out.println("====================================================");
    		            
    		        	
    		        	
    		        	
    		        } // نهاية بي
    	          	 break;
    
    	        	 default:System.out.println("   Wrong Selection of Ticket Class!");
    	        	 System.out.println("   please enter the correct choice!!!");
    		         System.out.println("");
    
    		        
    		        
    		   	   } // نهاية سوتش انواع الرحلة للاس
    		    	
    		    	
    		    	}while(choicee2!='g'&&choicee2!='G'&&choicee2!='b'&&choicee2!='B'&&choicee2!='f'&&choicee2!='F');
    		    }//0 نهاية 
    
    		    	break;
    		    case 1:{
    		    	
    		       do{
    		    	  System.out.println(" Press G for Guest Class");
    			      System.out.println(" Press B for Business Class");
    			      System.out.println(" Press F for First Class ");
    			      System.out.print (" Enter Choice:");
    		   	      choicee2=input.next().charAt(0);
    		   	   switch (choicee2){
    		    	 case 'g':
    		         case 'G':{
    		        	
    		        	System.out.println(" Enter Passport Number: ");
    			        int pass3=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  name3=input.next();
    			  // for max number is four
    			        do{
    			    	 do{
    			    		 do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults3=input.nextInt();
    			        if (adults3>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			     }while (adults3>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children3 =input.nextInt();
    			        if ((adults3+children3)>4){	
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		         }
    			     }while ((adults3+children3)>4); 
    			        System.out.print("Enter Number of Infants: ");
    			        infants3=input.nextInt();
    		           if (adults3+children3+infants3>4){
                           System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		           }
    			     }while (adults3+children3+infants3>4);
    		           System.out.print("Enter total of wieghts:");
    			       weight3 =input.nextInt();
    
    		        		        	
    			        	//calculate the total cost for guest tickets
    		          AdultCost3 = 2500; 
    		          ChildCost3 = AdultCost3*50/100; 
    		          infantCost3= AdultCost3*10/100; 
    		          TicketsCost3= (AdultCost3*adults3+ChildCost3*children3+infantCost3*infants3);
    		           allowedWeight3=0;
    		         ExtraWeightCost3=0;
    		          allowedWeight3= adults3*50+children3*30+infants3*20;
    		          ExtraWeightCost3= (weight3-allowedWeight3) ; 
    		          if( ExtraWeightCost3>0)
    		            	ExtraWeightCost3=ExtraWeightCost3*30;
    		            else ExtraWeightCost3=0;
    
    		          Totalcost3=(TicketsCost3+ExtraWeightCost3);
    
    		          
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+name3+"\t\t\t"+"Passport number:"+pass3);
    				      System.out.println("\t\t\t\tTickets Cost:"+TicketsCost3);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ ExtraWeightCost3);
    				      System.out.println("\t\t\t\tTotal Cost:"+Totalcost3);
    				      System.out.println("====================================================");
    
    
    		        	
    		        	
    		        } // نهاية جي للواحد
    	        	break;
    
    		   	   
    		        case 'f':
    		        case 'F':{
    		        	
    		        	System.out.println(" Enter Passport Number: ");
    			        int pass4=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  name4=input.next();
    			    do{
    				    do{
    					    do{
     
    			    	System.out.print("Enter Number of Adults: ");
    			         adults4=input.nextInt();
    			        if(adults4>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    					}while (adults4>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children4 =input.nextInt();
    			        if ((adults4+children4)>4){	
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    				    }while((adults4+children4)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants4=input.nextInt();
    		            if (adults4+children4+infants4>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    			        }while ((adults4+children4+infants4>4));
    		            System.out.print("Enter total of wieghts:");
    			        weight4 =input.nextInt();
    
    		         		        	
    			        	//calculate the total cost for first class tickets
    		            AdultCost4 = 5000; 
    		            ChildCost4 = AdultCost4*80/100; 
    		           infantCost4= AdultCost4*50/100; 
    		           TicketsCost4= (AdultCost4*adults4+ChildCost4*children4+infantCost4*infants4);
    		            allowedWeight4=0;
    		           ExtraWeightCost4=0;
    		           allowedWeight4= adults4*50+children4*30+infants4*20;
    		           ExtraWeightCost4= (weight4-allowedWeight4) ; 
    		           if( ExtraWeightCost4>0)
    		            	ExtraWeightCost4=ExtraWeightCost4*30;
    		            else ExtraWeightCost4=0;
    
    		           Totalcost4=(TicketsCost4+ExtraWeightCost4);
    
    		           
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+name4+"\t\t\t"+"Passport number:"+pass4);
    				      System.out.println("\t\t\t\tTickets Cost:"+TicketsCost4);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ ExtraWeightCost4);
    				      System.out.println("\t\t\t\tTotal Cost:"+Totalcost4);
    				      System.out.println("====================================================");
    
    			        	
    			        	
    			        	
    		        	
    		        	
    		        	
    		        } //نهاية اف للواحد
    	        	break;
    
    		        
    		        case 'b':
    		        case 'B':{
    		        	
    		        	System.out.println("Enter Passport Number: ");
    			        int pass5=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  name5=input.next();
    			     
    			        do{
    			        	do{
    			        		do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults5=input.nextInt();
    			        if (adults5>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			        }while (adults5>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children5 =input.nextInt();
    			        if ((adults5+children5)>4)	{
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    		            }while ((adults5+children5)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants5=input.nextInt();
    		            if (adults5+children5+infants5>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    			        }while (adults5+children5+infants5>4);
    		            System.out.print("Enter total of wieghts:");
    			        weight5 =input.nextInt();
    
    		         		        	
    			        	//calculate the total cost for business tickets
    		           AdultCost5 = 4000; 
    		            ChildCost5 = AdultCost5*60/100; 
    		          infantCost5= AdultCost5*30/100; 
    		           TicketsCost5= (AdultCost5*adults5+ChildCost5*children5+infantCost5*infants5);
    		           allowedWeight5=0;
    		           ExtraWeightCost5=0;
    		           allowedWeight5= adults5*50+children5*30+infants5*20;
    		           ExtraWeightCost5= (weight5-allowedWeight5) ; 
    		           if( ExtraWeightCost5>0)
    		            	ExtraWeightCost5=ExtraWeightCost5*30;
    		            else ExtraWeightCost5=0;
    
    		            Totalcost5=(TicketsCost5+ExtraWeightCost5);
    
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+name5+"\t\t\t"+"Passport number:"+pass5);
    				      System.out.println("\t\t\t\tTickets Cost:"+TicketsCost5);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ ExtraWeightCost5);
    				      System.out.println("\t\t\t\tTotal Cost:"+Totalcost5);
    				      System.out.println("====================================================");
    
    		        	
    		        	
    		        	
    		        	
    		        } //نهاية بي للواحد
    	          	 break;	
    
    	        	 default:System.out.println("   Wrong Selection of Ticket Class!");
    	        	 System.out.println("   please enter the correct choice!!!");
    		         System.out.println("");
    
    		   	   }// نهاية انواع الرحلة للواحد
    		    	
    		    	
    		    
    	    	}while(choicee2!='g'&&choicee2!='G'&&choicee2!='b'&&choicee2!='B'&&choicee2!='f'&&choicee2!='F');
    		    } //نهاية 1
    
    		    break;
    	          default:  System.out.println("   Wrong Selection of Destination Type!"); 
    	          System.out.println("   please enter the correct choice!!!");
    	          System.out.println("");
    		    }// نهاية سوتش صفر وواحد للاس
    			}while(choice!=1&&choice!=0);
    
    			break;
    
    
    		} //S نهاية
    
    		
    		case 'n':
    		case 'N':
    		{count2++;
    			
    			do{
    		    System.out.println(" Press 0 for Local Destination");
    		    System.out.println(" Press 1 for Abroad Destination");
    		    System.out.print(" Enter the Choice: ");
    		    choice=input.nextInt();
    		    System.out.println (" ");
    		    switch (choice){
    		    case 0:{
    		    	do{
    		    	  System.out.println(" Press G for Guest Class");
    			      System.out.println(" Press B for Business Class");
    			      System.out.println(" Press F for First Class ");
    			      System.out.print (" Enter Choice:");
    		   	      choicee2=input.next().charAt(0);
    		  	    System.out.print(" ");
    
    		   	   switch (choicee2){
    		    	 case 'g':
    		         case 'G':
    		        {
    		        	System.out.println(" Enter Passport Number: ");
    			        int passport=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  namee=input.next();
    			      do{
    			        do{
    			        	do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults11=input.nextInt();
    			        if (adults11>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			        }while (adults11>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children11 =input.nextInt();
    			        if ((adults11+children11)>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    		            }while((adults11+children11)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants11=input.nextInt();
    		            if (adults11+children11+infants11>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    		            } while( adults11+children11+infants11>4);
    		            System.out.print("Enter total of wieghts:");
    			        weight11 =input.nextInt();
    			        
    			        
    			    	//calculate the total cost for guest tickets
    		                Adult_Cost = 150; 
    		               Child_Cost = Adult_Cost*70/100; 
    		               infant_Cost= Adult_Cost*20/100; 
    		                Tickets_Cost= (Adult_Cost*adults11+Child_Cost*children11+infant_Cost*infants11);
    		                allowed_Weight=0;
    		               Extra_WeightCost=0;
    
    		               allowed_Weight=  adults11*20+children11*15+infants11*10;  
    		               Extra_WeightCost= (weight11-allowed_Weight) ;
    		               if( Extra_WeightCost>0)
    			            	Extra_WeightCost=Extra_WeightCost*10;
    			            else Extra_WeightCost=0;
    
    		                Total_Cost=(Tickets_Cost+Extra_WeightCost);
    		               
    					      System.out.println("====================================================");
    					      System.out.println("Name:"+namee+"\t\t\t"+"Passport number:"+passport);
    					      System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost);
    					      System.out.println("\t\t\t\tExtra Weight cost:"+ Extra_WeightCost);
    					      System.out.println("\t\t\t\tTotal Cost:"+Total_Cost);
    					      System.out.println("====================================================");
    
    
    		        	
    		        	
    		        	
    		        } //نهاية جي للصفر
    	        	break;	
    
    		        case 'f':
    		        case 'F':{
    		        	
    		        	System.out.println(" Enter Passport Number: ");
    			        int passport1=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  namee1=input.next();
    			      do{
    			        do{
    			        	do{
    			        System.out.print("Enter Number of Adults: ");
    			         adults22=input.nextInt();
    			        if (adults22>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			      }while (adults22>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children22 =input.nextInt();
    			        if ((adults22+children22)>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    		        }while((adults22+children22)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants22=input.nextInt();
    		            if (adults22+children22+infants22>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    		        }while ((adults22+children22)>4);
    		            System.out.print("Enter total of wieghts:");
    			        weight22 =input.nextInt();
              	 
    			        
    			      //calculate the total cost for first class tickets
    		               Adult_Cost1 = 600; 
    		                Child_Cost1 = Adult_Cost1*85/100; 
    		              infant_Cost1= Adult_Cost1*50/100; 
    		                Tickets_Cost1= (Adult_Cost1*adults22+Child_Cost1*children22+infant_Cost1*infants22);
    		               allowed_Weight1=0;
    		                Extra_WeightCost1=0;
    
    		               allowed_Weight1=  adults22*20+children22*15+infants22*10;  
    		               Extra_WeightCost1= (weight22-allowed_Weight1) ;
    		               if( Extra_WeightCost1>0)
    			            	Extra_WeightCost1=Extra_WeightCost1*10;
    			            else Extra_WeightCost1=0;
    
    		               Total_Cost1=(Tickets_Cost1+Extra_WeightCost1);
    		               
    					      System.out.println("====================================================");
    					      System.out.println("Name:"+namee1+"\t\t\t"+"Passport number:"+passport1);
    					      System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost1);
    					      System.out.println("\t\t\t\tExtra Weight cost:"+ Extra_WeightCost1);
    					      System.out.println("\t\t\t\tTotal Cost:"+Total_Cost1);
    					      System.out.println("====================================================");
    
    		        	
    		        	
    		        	
    		        }// نهاية اف للصفر
    		   	   
    	          	 break;
    
    		        case 'b':
    		        case 'B':{
    		        	System.out.println(" Enter Passport Number: ");
    			        int passport2=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  namee2=input.next();
    			     do{
    			    	 do{
    			    		 do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults33=input.nextInt();
    			        if (adults33>4 ){
    			      
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			     }while(adults33>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children33 =input.nextInt();
    			        if ((adults33+children33)>4)	{
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    		        }while ((adults33+children33)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants33=input.nextInt();
    		            if (adults33+children33+infants33>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    		        }while (adults33+children33+infants33>4);
    		            System.out.print("Enter total of wieghts:");
    			        weight33 =input.nextInt();
          	 
    			        //calculate the total cost for business tickets
    		                Adult_Cost2 = 400; 
    		               Child_Cost2 = Adult_Cost2*80/100; 
    		                infant_Cost2= Adult_Cost2*40/100; 
    		               Tickets_Cost2= (Adult_Cost2*adults33+Child_Cost2*children33+infant_Cost2*infants33);
    		                allowed_Weight2=0;
    		                Extra_WeightCost2=0;
    
    		               allowed_Weight2=  adults33*20+children33*15+infants33*10;  
    		               Extra_WeightCost2= (weight33-allowed_Weight2) ;
    		               if( Extra_WeightCost2>0)
    			            	Extra_WeightCost2=Extra_WeightCost2*10;
    			            else Extra_WeightCost2=0;
    
    		               Total_Cost2=(Tickets_Cost2+Extra_WeightCost2);
    		               
    					      System.out.println("====================================================");
    					      System.out.println("Name:"+namee2+"\t\t\t"+"Passport number:"+passport2);
    					      System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost2);
    					      System.out.println("\t\t\t\tExtra Weight cost:"+ Extra_WeightCost2);
    					      System.out.println("\t\t\t\tTotal Cost:"+Total_Cost2);
    					      System.out.println("====================================================");
    
    		        	
    		        	
    		        	
    		        	
    		        } // نهاية  بي للصفر
    		      	 break;
    
    	        	 default:System.out.println("   Wrong Selection of Ticket Class!");
    	        	 System.out.println("   please enter the correct choice!!!");
    		         System.out.println("");
    
    		        
    		   	   } //نهاية سويتش انواع الرحلة للصفر
    
    		    	
    		    	
    		    	
    	    	}while(choicee2!='g'&&choicee2!='G'&&choicee2!='b'&&choicee2!='B'&&choicee2!='f'&&choicee2!='F');
    		    } //نهاية صفر
    
    		    break;
    	        case 1:
    	        {
    	        	do{
    	        	  System.out.println(" Press G for Guest Class");
    			      System.out.println(" Press B for Business Class");
    			      System.out.println(" Press F for First Class ");
    			      System.out.print (" Enter Choice:");
    		   	       choicee2=input.next().charAt(0);	
    		   	      
    		   	      switch (choicee2){
    		   	   case 'g':
    		   	      case 'G':
    		   	      { 
    		   	    	  
    		   	    	System.out.println(" Enter Passport Number: ");
    			        int passport3=input.nextInt();
    			        System.out.println("Enter Name:");
    			        String  namee3=input.next();
    			    do{
    			    	do{
    			    		do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults44=input.nextInt();
    			        if (adults44>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			    }while(adults44>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children44 =input.nextInt();
    			        if ((adults44+children44)>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			    }while((adults44+children44)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants44=input.nextInt();
    		            if (adults44+children44+infants44>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    			    }while (adults44+children44+infants44>4);
    		            System.out.print("Enter total o4f wieghts:");
    			        weight44 =input.nextInt();
          	 
    			    	//calculate the total cost for guest tickets
    		                Adult_Cost3 = 2000; 
    		              Child_Cost3 = Adult_Cost3*70/100; 
    		                infant_Cost3= Adult_Cost3*20/100; 
    		              Tickets_Cost3= (Adult_Cost3*adults44+Child_Cost3*children44+infant_Cost3*infants44);
    		               allowed_Weight3=0;
    		              Extra_WeightCost3=0;
    
    		               allowed_Weight3=  adults44*30+children44*20+infants44*15;  
    		               Extra_WeightCost3= (weight44-allowed_Weight3) ;
    		               if( Extra_WeightCost3>0)
    			            	Extra_WeightCost3=Extra_WeightCost3*30;
    			            else Extra_WeightCost3=0;
    
    		                Total_Cost3=(Tickets_Cost3+Extra_WeightCost3);
    		               
    					      System.out.println("====================================================");
    					      System.out.println("Name:"+namee3+"\t\t\t"+"Passport number:"+passport3);
    					      System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost3);
    					      System.out.println("\t\t\t\tExtra Weight cost:"+ Extra_WeightCost3);
    					      System.out.println("\t\t\t\tTotal Cost:"+Total_Cost3);
    					      System.out.println("====================================================");
    
    
    		   	    	  
    		   	      } // نهاية  جي للواحد
    		        	break;
    
    		   	   case 'f':
    	   	       case 'F':
    	   	       {
    	   	    	   
    	   	    	System.out.println(" Enter Passport Number: ");
    		        int passport4=input.nextInt();
    		        System.out.println("Enter Name:");
    		        String  namee4=input.next();
    		       do{
    		    	   do{
    		    		   do{
    		        System.out.print("Enter Number of Adults: ");
    		        adults55=input.nextInt();
    		        if (adults55>4 ){
                        System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		        }
    		       }while(adults55>4 );
    		        System.out.print("Enter Number of Children: "); 
    		        children55=input.nextInt();
    		        if ((adults55+children55)>4){
                        System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		        }
    	   	       }while((adults55+children55)>4);
    		        System.out.print("Enter Number of Infants: ");
    		        infants55=input.nextInt();
    	            if (adults55+children55+infants55>4){
                        System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    	            }
    	   	       }while ((adults55+children55+infants55>4));
    	            System.out.print("Enter total of wieghts:");
    		        weight55 =input.nextInt();
    			        	
    		      //calculate the total cost for first class tickets
    	                Adult_Cost4 = 4500; 
    	               Child_Cost4 = Adult_Cost4*85/100; 
    	                infant_Cost4= Adult_Cost4*50/100; 
    	                Tickets_Cost4= (Adult_Cost4*adults55+Child_Cost4*children55+infant_Cost4*infants55);
    	                allowed_Weight4=0;
    	               Extra_WeightCost4=0;
    
    	               allowed_Weight4=  adults55*30+children55*20+infants55*15;  
    	               Extra_WeightCost4= (weight55-allowed_Weight4) ;
    	               if( Extra_WeightCost4>0)
    		            	Extra_WeightCost4=Extra_WeightCost4*30;
    		            else Extra_WeightCost4=0;
    
    	               Total_Cost4=(Tickets_Cost4+Extra_WeightCost4);
    	               
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+namee4+"\t\t\t"+"Passport number:"+passport4);
    				      System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost4);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ Extra_WeightCost4);
    				      System.out.println("\t\t\t\tTotal Cost:"+Total_Cost4);
    				      System.out.println("====================================================");
    
    	   	    	 	   	    	   
    	   	       }// نهاية اف للواحد
    	   		 break; 
    
    	   	       case 'b':
    	   	       case 'B':
    	   	       {
    	   	    	   
    	   	    	System.out.println(" Enter Passport Number: ");
    		        int passport5=input.nextInt();
    		        System.out.println("Enter Name:");
    		        String  namee5=input.nextLine();
    		       do{
    		    	   do{
    		    		   do{
    		        System.out.print("Enter Number of Adults: ");
    		        adults66=input.nextInt();
    		        if (adults66>4 ){
                        System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		       }
    		       }while(adults66>4 );
    		        System.out.print("Enter Number of Children: "); 
    		        children66 =input.nextInt();
    		        if ((adults66+children66)>4){
                        System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		       }
    	   	       }while((adults66+children66)>4);
    		        System.out.print("Enter Number of Infants: ");
    		        infants66=input.nextInt();
    	            if (adults66+children66+infants66>4){
                        System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    	            }
    	   	       }while((adults66+children66+infants66>4));
    	            System.out.print("Enter total of wieghts:");
    		        weight66 =input.nextInt();
    			        	
    		      //calculate the total cost for business tickets
    	               Adult_Cost5 = 3500; 
    	              Child_Cost5 = Adult_Cost5*80/100; 
    	               infant_Cost5= Adult_Cost5*40/100; 
    	              Tickets_Cost5= (Adult_Cost5*adults66+Child_Cost5*children66+infant_Cost5*infants66);
    	                allowed_Weight5=0;
    	               Extra_WeightCost5=0;
    
    	               allowed_Weight5=  adults66*30+children66*20+infants66*15;  
    	               Extra_WeightCost5= (weight66-allowed_Weight5) ;
    	               if( Extra_WeightCost5>0)
    		            	Extra_WeightCost5=Extra_WeightCost5*30;
    		            else Extra_WeightCost5=0;
    
    	              Total_Cost5=(Tickets_Cost5+Extra_WeightCost5);
    	               
    				      System.out.println("====================================================");
    				      System.out.println("Name:"+namee5+"\t\t\t"+"Passport number:"+passport5);
    				      System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost5);
    				      System.out.println("\t\t\t\tExtra Weight cost:"+ Extra_WeightCost5);
    				      System.out.println("\t\t\t\tTotal Cost:"+Total_Cost5);
    				      System.out.println("====================================================");   
    	   	    	   
    	   	    	   
    	   	       } // نهاية بي للواحد
    	   	    break; 
    
    	        	 default:System.out.println("   Wrong Selection of Ticket Class!");
    	        	 System.out.println("   please enter the correct choice!!!");
    		          System.out.println("");
    
    		   	      
    		   	      } //نهاية سويتش انواع الرحلة للواحد
    	        	
    		    	}while(choicee2!='g'&& choicee2!='G'&&choicee2!='b'&&choicee2!='B'&&choicee2!='f'&&choicee2!='F');
    	        	
    	        	
    	        	
    	        	
    	        }// نهاية واحد
    		    
    	          break;
    	          default:  System.out.println("Wrong Selection of Destination Type!"); 
    	          System.out.println("   please enter the correct choice!!!");
    	          System.out.println("");
    
    		    } // نهاية سويتش صفر وواحد
    			
    			}while(choice!=1&&choice!=0);
    
    			break;
    		} // N نهاية 
    		
    		
    		case 'o':
    		case 'O':
    		{count3++;
    			do{
    			System.out.println(" Press 0 for Local Destination");
    		    System.out.println(" Press 1 for Abroad Destination");
    		    System.out.print(" Enter the Choice: ");
    		    choice=input.nextInt();
    		    System.out.println (" ");
    	         switch (choice){
    	         
    	         case 0:
    	         case 1:{
    	        	do{ 
    	        	 System.out.println(" Press G for Guest Class");
    			      System.out.println(" Press B for Business Class");
    			      System.out.println(" Press F for First Class ");
    			      System.out.print (" Enter Choice:");
    		   	      choicee2=input.next().charAt(0); 
    		   	 
    			    switch (choicee2){
    			    case 'g':
    		        case 'G':
    		        case 'f':
    		        case 'F':
    		        case 'b':
    		        case 'B':{
    		        	  System.out.print(" Enter Airline Name: ");
    					    String Airline=input.next();
    					    
    		        	System.out.print(" Enter Passport Number: ");
    			        int passport6=input.nextInt();
    			        System.out.println(" Enter Name:");
    			        String  namee6=input.next();
    			      do{
    			    	  do{
    			    		  do{
    			        System.out.print("Enter Number of Adults: ");
    			        adults77=input.nextInt();
    			        if (adults77>4 ){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			      }while  (adults77>4 );
    			        System.out.print("Enter Number of Children: "); 
    			        children77 =input.nextInt();
    			        if ((adults77+children77)>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    			        }
    			      }while ((adults77+children77)>4);
    			        System.out.print("Enter Number of Infants: ");
    			        infants77=input.nextInt();
    		            if (adults77+children77+infants77>4){
                            System.out.println(" The Maximum Number of Tickets allowed is FOUR"); 
    		            }
    			      }while((adults77+children77+infants77>4));
    		            System.out.print("Enter total of wieghts:");
    			        weight77 =input.nextInt(); 
    			        System.out.print("Enter Ticket Price for Adult:");
    			        Price_for_adult =input.nextInt();
    			        if(children77>0){
    				    System.out.print("Enter Ticket Price for children:");
    			        price_for_children =input.nextInt();
    
    			        	
    			        	
    			        }
    			        if (infants77>0){
    			        	
    				    System.out.print("Enter Ticket Price for infants:");
    			        price_for_infants =input.nextInt();
    
    			        	
    			        }
    		   	    	   
    			        System.out.print("Enter The Extra Of Weights:");
    			        int Extra_wights =input.nextInt();
    			        System.out.print("Enter Cost Of Weight Extra per Kg:");
    			        int Cost_Extra_per_Kg=input.nextInt();
    			        
    			        
    					
    					 Tickets_Cost6=((Price_for_adult*adults77)+(price_for_children*children77)+(price_for_infants*infants77));
    				 Extra_wight_cost=(Extra_wights*Cost_Extra_per_Kg);
    					Total_Cost6=(Tickets_Cost6+Extra_wight_cost);
    			        System.out.println("===============================================================");
    			        System.out.println("Name:"+namee6+"\t\t\t"+"Passport number:"+passport6);
    				    System.out.println("\t\t\t\tTickets Cost:"+Tickets_Cost6);
    				    System.out.println("\t\t\t\tExtra Weight cost:"+Extra_wight_cost);
    				    System.out.println("\t\t\t\tTotal Cost:"+Total_Cost6);
    				    System.out.println("===============================================================");   
    
    		        			        	
    		        }// نهاية  كيس انواع الرحلة 
    		        break; 
    
    	        	 default:System.out.println("   Wrong Selection of Ticket Class!");
    	        	 System.out.println("   please enter the correct choice!!!");
    		         System.out.println("");
    
    			    }// oنهاية سويتش انواع الرحله لل
    		    	}while(choicee2!='g'&&choicee2!='G'&&choicee2!='b'&&choicee2!='B'&&choicee2!='f'&&choicee2!='F');
    
    			    
    	        	 
    	        	 
    	        	 
    	         } //نهاية كيس صفر وواحد 
    	         
    	         break;
    	          default:  System.out.println("Wrong Selection of Destination Type!"); 
    	          System.out.println("   please enter the correct choice!!!");
    	          System.out.println("");
    
    	         
    	         }// Oنهاية سويتش صفر وواحد لل 
    			}while(choice!=1&&choice!=0);
    	
    		break;	
    		} //O نهاية 
    		
    	
    		default: {System.out.println("   Wrong Selection of Airline Name!");
    		
    		 System.out.println("   please enter the correct choice!!!");
    			 
    		 System.out.println("-------------------------");
    		 System.out.println("   Wrong Seletion of Airline Name!");
    	     System.out.println("-------------------------");		
    	 
    		}
    		
    		}// نهايى سويتش الكبيرة
    }while((choice1!='s'&&choice1!='S')&&(choice1!='n'&&choice1!='N')&&(choice1!='o'&&choice1!='O'));
    
    command=JOptionPane.showConfirmDialog(null, "do you want to continue?",null, JOptionPane.YES_NO_CANCEL_OPTION);
    if ((command==JOptionPane.NO_OPTION)&&(count1==0||count2==0||count3==0)){
    	JOptionPane.showMessageDialog(null,"You Should make a reservation at least one for each airline");
    
    	command=JOptionPane.YES_OPTION;
    }
    else if ((command ==JOptionPane.NO_OPTION)&&(count1>0&&count2>0&&count3>0))
    break;
    	    
    	    
      }
    		System.out.println("                 Saudi         flyNas       Other  ");
    		System.out.println(" -----------------------------------------------------");
    		System.out.println("first Class       "+Totalcost1+"     "+Total_Cost1+"    "+Total_Cost4);
    		System.out.println("Business Class    "+Totalcost2+"     "+Total_Cost2+"    "+Total_Cost5);
    		System.out.println("guest class       "+Totalcost+"      "+Total_Cost+"    "+ Total_Cost3);
    		System.out.println("------------------------------------------------------");
    		System.out.println("Total             "+(Totalcost1+Totalcost1+Totalcost1)+"    "+(Total_Cost1+Total_Cost2+Total_Cost)+"    "+(Total_Cost4+Total_Cost5+Total_Cost3));
    		System.out.println("No.of Reservation    "+count1+"     "+count2+"      "+count3);
    		System.out.println("Average     "+(Totalcost1+Totalcost1+Totalcost1)/count1+"    "+(Total_Cost1+Total_Cost2+Total_Cost)/count2+"    "+(Total_Cost4+Total_Cost5+Total_Cost3/count3));
    
    
      
    	}
    	
    	
    }
    Attached Thumbnails Attached Thumbnails please how can i add methods that in attachments?-20150501_010234.jpg  

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: please how can i add methods that in attachments?

    I think this is pretty much the definition of a homework dump.

    You are going to have to narrow down your problem.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  3. #3
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: please how can i add methods that in attachments?

    Wow! Over 1200 lines of code in a post. That must be a record. And if I were to guess about the assignment, I would have thought lists and objects would have been covered.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  4. #4
    Join Date
    May 2015
    Posts
    2
    Rep Power
    0

    Default Re: please how can i add methods that in attachments?

    Quote Originally Posted by jim829 View Post
    Wow! Over 1200 lines of code in a post. That must be a record. And if I were to guess about the assignment, I would have thought lists and objects would have been covered.

    Regards,
    Jim
    i know that's very much you are'nt the only one said that lol! ..maybe you are good in programing but i'm not yet.

  5. #5
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,423
    Blog Entries
    7
    Rep Power
    27

    Default Re: please how can i add methods that in attachments?

    Quote Originally Posted by Tolls View Post
    I think this is pretty much the definition of a homework dump.
    It's worse: it's the mother of all homework dumps. I'm not going to help the OP.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  6. #6
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: please how can i add methods that in attachments?

    Quote Originally Posted by new programer222 View Post
    maybe you are good in programing but i'm not yet.
    Like this, you won't ever be good at it either.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  7. #7
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    6,226
    Rep Power
    13

    Default Re: please how can i add methods that in attachments?

    I am going to offer a suggestion. From what I have observed in your posts, you are trying to do something which is not effective or even proper using simple variables. You need to use arrays or lists and probably some appropriately thought out homegrown classes. I find it difficult to believe the a teach would provide an assignment like this without covering the aspects of Java which would be most pertinent to the assignment. I recommend you go and discuss this with your teacher to ensure you are on the correct track.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

Similar Threads

  1. how to decrypt emails and attachments in java
    By fynn in forum New To Java
    Replies: 7
    Last Post: 07-27-2014, 03:37 PM
  2. Axis 1.4 Larg Attachments out of Memory
    By BSA in forum Advanced Java
    Replies: 7
    Last Post: 12-27-2010, 05:02 PM
  3. Reading file attachments like gmail attachements
    By janu.c in forum New To Java
    Replies: 1
    Last Post: 08-05-2009, 07:07 AM
  4. axis 1.2 dime and mime attachments.
    By tinkywinky in forum New To Java
    Replies: 0
    Last Post: 09-01-2008, 02:00 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
  •