Results 1 to 15 of 15
  1. #1
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Exclamation I'm new in JAVA and I have a project

    "Write a Java Program to let user enter certain number of students names and grades first. Then let your program find maximum, minimum, average, and the standard deviation of the grades using separate methods for each case and print the results. Finally, write a method to sort the names then print student names and grades in the descending order with respect to the grades. Get the number of students from the user, then create two arrays, String and int types to store student names and grades respectively (two dimensional array usage is optional). Write the necessary methods and print the necessary values and at the end sort the student names with respect to the grades in the descending order."

    Hey Guys, this is my project and i have to train it until tomorrow night :)
    Can you help me a little bit, please ??
    Thank you for all :)
    Last edited by mzone; 05-14-2012 at 10:59 PM.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: I'm new in JAVA and I have a project

    Quote Originally Posted by mzone View Post
    Can you help me a little bit, please ??
    Sure. Lets see what you've done so far. Ask a specific question and you're guaranteed to get an answer.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    i have done this

    import java.util.Scanner;
    import javax.util.*;
    public class Project{


    public static void main(String[] args) {

    Scanner input= new Scanner (System.in);

    System.out.println("Please,Enter certain number of students names and grades:");

    int N = input.nextInt(); //N is certain number of Students names and grades

    System.out.println("Your certain number of students names is:" + N);

    String[] studentnames =new String[N];


    int[] grades= new int[N];




    }
    }

  4. #4
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    you can help me how i can get student names and grades from user , and how i can appoint a two diomensional array ??

  5. #5
    EscSequenceAlpha is offline Senior Member
    Join Date
    Apr 2012
    Posts
    115
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    Please use the CODE tags makes it easier to see

  6. #6
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    what is the Code tags?

  7. #7
    EscSequenceAlpha is offline Senior Member
    Join Date
    Apr 2012
    Posts
    115
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    Java Code:
    import java.util.Scanner;
    import javax.util.*;
    public class Project{
    
    
    public static void main(String[] args) {
    
    Scanner input= new Scanner (System.in);
    
    System.out.println("Please,Enter certain number of students names and grades:");
    
    int N = input.nextInt(); //N is certain number of Students names and grades
    
    System.out.println("Your certain number of students names is:" + N);
    
    String[] studentnames =new String[N];
    
    
    int[] grades= new int[N];
    
    
    
    
    }
    }

  8. #8
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    oke thanks

  9. #9
    EscSequenceAlpha is offline Senior Member
    Join Date
    Apr 2012
    Posts
    115
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    first of all you should use a loop to input values in an array

    Java Code:
    int[] grades = new int[10];
    		
    		for( int i = 0 ; i < grades.length ; i++)
    		{
    			Scanner input = new Scanner(System.in);
    			System.out.println("please input grade for student ");
    			grades[i] = input.nextInt();
    you can look up multidimentional arrays, I did a task on that a few days ago. basically they are an array of arrays, with the first representing rows and the latter columns.

  10. #10
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    well, now how can i get student names from user?

  11. #11
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    Quote Originally Posted by EscSequenceAlpha View Post
    first of all you should use a loop to input values in an array

    Java Code:
    int[] grades = new int[10];
    		
    		for( int i = 0 ; i < grades.length ; i++)
    		{
    			Scanner input = new Scanner(System.in);
    			System.out.println("please input grade for student ");
    			grades[i] = input.nextInt();
    you can look up multidimentional arrays, I did a task on that a few days ago. basically they are an array of arrays, with the first representing rows and the latter columns.

    This is so useful for me thank you :)

  12. #12
    mzone is offline Member
    Join Date
    May 2012
    Posts
    8
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    I have to get student names from user how can i do this?

  13. #13
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: I'm new in JAVA and I have a project

    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  14. #14
    danoc93 is offline Member
    Join Date
    Apr 2012
    Posts
    37
    Rep Power
    0

    Default Re: I'm new in JAVA and I have a project

    Use scanner class and read a String called name[i] (from an array of names), then u can use grade[i] and name[i] to get the name and grade corresponding the number i...

  15. #15
    DarrylBurke's Avatar
    DarrylBurke is online now Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,236
    Rep Power
    19

    Default Re: I'm new in JAVA and I have a project

    Quote Originally Posted by danoc93 View Post
    u can use grade[i] and name[i] to get the name and grade corresponding the number i...
    Parallel array anti-pattern. Java is an object oriented language.

    Also, please spell words in full. You not u. This is a programming forum, not SMS chat.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. java project
    By nithingafoor in forum New To Java
    Replies: 0
    Last Post: 01-16-2012, 08:27 AM
  2. Creating a project in eclipse from existing project
    By Suraiya in forum New To Java
    Replies: 1
    Last Post: 10-08-2011, 09:14 AM
  3. Java Project,please help
    By jimos in forum New To Java
    Replies: 5
    Last Post: 01-16-2011, 12:54 AM
  4. UML to Java project
    By banie in forum NetBeans
    Replies: 3
    Last Post: 01-28-2008, 10:16 AM

Posting Permissions

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