The JAVA club

amilabanuka

Well-known member
  • Sep 30, 2006
    7,291
    878
    113
    Thama math hoyanooo....
    rochel1977 said:
    nice work machan. will see others coding also. :yes:
    ya
    thama kawuruwath wena damme nane
    guys try these questions and come up with a solution. then we can discuss abt it. Mine is also not 100% with coding standards but quite a way.... please upload your coding so we can discuss where to improve in what are the strong places in the coding..
     

    nagaya

    Member
    Mar 18, 2007
    12,671
    194
    0
    ¤--bACarDi--¤ said:
    Hey machan eny1 interested abt how Execute a java programme.... It only create a .class file no...? Plz any1 help abt diz...
    java name.class on shell :D
     

    rochel1977

    Well-known member
  • May 15, 2006
    11,466
    2,673
    113
    AKL, NZ and Kandy
    Ko me ape Java club eke members la?? ;)

    kamak ne. menna thawath prob ekak. Arrays gena. meke 29th line eke command eke upset ekak thiyanawa. danna kawuruhari udaw karandako balanda.

    Code:
    import java.util.*;
    
    public class StudentScore
    {
    		
    	public static void main (String [] args) 
    	{
    		System.out.print("Enter a number of students:");
    		int n = new Scanner(System.in).nextInt();
    		
                  double score[] = new double[n];
    		char grade[] = new char[n];
    		
    		keyinScore(score);
    		
    		setGrade(score,grade);
    		
    		displayAll(score,grade);
    	}
    	
    	public static void keyinScore(double [] mark)
    	{
    		for (int j=0; j<mark.length; j++)
    		{
    			System.out.println("\nEnter the student's score:");
    			//? To assign the scores in the array 		}	
    	}
    	
    	public static void setGrade(double [] mark, char gr[])
    	{
    		for (int j=0; j<mark.length; j++)
    		{
    			 //? To determine grade and assign in the array
    		}	
    	}
    		
    	public static void displayAll(double [] mark, char gr[])
    	{
    		for (int j=0; j<mark.length; j++)
    		{
    			 System.out.println("\nStudent: "+(j+1)+"  Score: "+mark[j]+"  Grade: "+gr[j]);
    		}	
    	}	
    		
    }//close class
     

    amilabanuka

    Well-known member
  • Sep 30, 2006
    7,291
    878
    113
    Thama math hoyanooo....
    rochel1977 said:
    Ko me ape Java club eke members la?? ;)

    kamak ne. menna thawath prob ekak. Arrays gena. meke 29th line eke command eke upset ekak thiyanawa. danna kawuruhari udaw karandako balanda.

    Code:
    import java.util.*;
    
    public class StudentScore
    {
            
        public static void main (String [] args) 
        {
            System.out.print("Enter a number of students:");
            int n = new Scanner(System.in).nextInt();
            
                  double score[] = new double[n];
            char grade[] = new char[n];
            
            keyinScore(score);
            
            setGrade(score,grade);
            
            displayAll(score,grade);
        }
        
        public static void keyinScore(double [] mark)
        {
            for (int j=0; j<mark.length; j++)
            {
                System.out.println("\nEnter the student's score:");
                //? To assign the scores in the array         }    
        }
        
        public static void setGrade(double [] mark, char gr[])
        {
            for (int j=0; j<mark.length; j++)
            {
                 //? To determine grade and assign in the array
            }    
        }
            
        public static void displayAll(double [] mark, char gr[])
        {
            for (int j=0; j<mark.length; j++)
            {
                 System.out.println("\nStudent: "+(j+1)+"  Score: "+mark[j]+"  Grade: "+gr[j]);
            }    
        }    
            
    }//close class
    machan ube for loop eke closing tab eka comment wela thiyenne. ethana enter karapan ethakota hari
    uba thama eke functinality okkoma impliment kare na neda?
    setScore() eka thama emptyne?
     
    Last edited:

    rochel1977

    Well-known member
  • May 15, 2006
    11,466
    2,673
    113
    AKL, NZ and Kandy
    amilabanuka said:
    machan ube for loop eke closing tab eka comment wela thiyenne. ethana enter karapan ethakota hari
    uba thama eke functinality okkoma impliment kare na neda?
    setScore() eka thama emptyne?

    machan kiyapu de therune ne. koi line ekeda? lin 29 eke neda? ethana thamai mamath me hira wela inne. ethanata danda one mokakda?? :dull: :dull:
     

    amilabanuka

    Well-known member
  • Sep 30, 2006
    7,291
    878
    113
    Thama math hoyanooo....
    rochel1977 said:
    machan kiyapu de therune ne. koi line ekeda? lin 29 eke neda? ethana thamai mamath me hira wela inne. ethanata danda one mokakda?? :dull: :dull:

    29 line eka hariye thiyena for loop eka close karala na
    uba eka close karala thiyenawa eth e comment region eke
    ehinda eka warahanaka aduwak thiyenawa.

    Code:
    import java.util.*;
    
    public class StudentScore
    {
    
        public static void main (String [] args)
        {
            System.out.print("Enter a number of students:");
            int n = new Scanner(System.in).nextInt();
    
                  double score[] = new double[n];
            char grade[] = new char[n];
    
            keyinScore(score);
    
            setGrade(score,grade);
    
            displayAll(score,grade);
        }
    
        public static void keyinScore(double [] mark)
        {
            for (int j=0; j<mark.length; j++)
            {
                System.out.println("\nEnter the student's score:");
                //? To assign the scores in the array
            }
        }
    
        public static void setGrade(double [] mark, char gr[])
        {
            for (int j=0; j<mark.length; j++)
            {
                 //? To determine grade and assign in the array
            }
        }
    
        public static void displayAll(double [] mark, char gr[])
        {
            for (int j=0; j<mark.length; j++)
            {
                 System.out.println("\nStudent: "+(j+1)+"  Score: "+mark[j]+"  Grade: "+gr[j]);
            }
        }
    
    }//close class
     

    GameHOG

    Member
    Feb 21, 2009
    10
    0
    0
    my.php
     
    Last edited: