Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Java Project Help

    I am having trouble programming this project. If someone could show me how I will really appreciate it
    Here is the instructions
    1. Create a new Java Project called FinalGrade with a single class called Tester.
    2. Prompt the user to enter a student’s first name, followed by another prompt to enter the student’s last name.
    3. Prompt the user to enter the number of assignments to be averaged (ex. 6).
    4. Using a for-loop, prompt the user to enter the numeric grade (whole numbers only) until the exact number of assignments for the student are entered. NOTE: The grades should be stored in an array.
    5. Loop back through the array of grades and calculate an average of the grades entered.
    6. Print the following information (in the order shown) on the screen…
    a. Student’s Last Name
    b. Student’s First Name
    c. Student’s Final Grade (Displayed as a Letter Grade and not the Numeric Value)
    Example Output…
    Ben, Nicole – A

  2. #2
    Master Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    5,213
    Thanks
    21
    Thanked 545 Times in 539 Posts
    If you're supposed to code that in Java, then this is the wrong section. This section is about JavaScript.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  3. #3
    Super Moderator vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,278
    Thanks
    2
    Thanked 40 Times in 40 Posts
    Thread moved to the Java and JSP forum.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!

  4. #4
    New to the CF scene
    Join Date
    Apr 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Smiles View Post
    I am having trouble programming this project. If someone could show me how I will really appreciate it
    Here is the instructions
    1. Create a new Java Project called FinalGrade with a single class called Tester.
    2. Prompt the user to enter a student’s first name, followed by another prompt to enter the student’s last name.
    3. Prompt the user to enter the number of assignments to be averaged (ex. 6).
    4. Using a for-loop, prompt the user to enter the numeric grade (whole numbers only) until the exact number of assignments for the student are entered. NOTE: The grades should be stored in an array.
    5. Loop back through the array of grades and calculate an average of the grades entered.
    6. Print the following information (in the order shown) on the screen…
    a. Student’s Last Name
    b. Student’s First Name
    c. Student’s Final Grade (Displayed as a Letter Grade and not the Numeric Value)
    Example Output…
    Ben, Nicole – A
    This seems like a simple assignment on an intro to getting input from a user. What exactly are you having trouble with, or what have you tried?
    If you're having trouble with where to start with getting input I'd recommend looking into using a Scanner.

    Quick Scanner example:

    //Scanner for System In
    Scanner sysIn = new Scanner(System.in);

    //The prompt for the user
    System.out.print("Enter a student's first name: ");

    //Save what the user entered into a String
    String fristName = sysIn.next();

  5. #5
    New to the CF scene
    Join Date
    Apr 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    what seems to have a problem here this is a simple program right

    -.getting input from the user lets say n is the number of assignments
    -.in for loop (i=0;i<n;i++) print the n's s.o.p() and store it in array a[i].
    -.and add total=total+a[i] (inside the loop)
    find average avg =total/6
    in if statement if (avg >=90) again same avg>=80 etc...
    print A+,A,B or whatever the grade format is
    first name and last name you can print as said above by" wiseman"


 

Tags for this Thread

Posting Permissions

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