Search:

Type: Posts; User: Gerock7

Search: Search took 0.89 seconds.

  1. Replies
    8
    Views
    2

    Re: Simple Code not working properly

    When I run the program:
    First window pops and ask name
    Second window school grade
    Third window school name
    Fourth window number of grades
    Fifth and possibly more windows Enter the grades
    Last...
  2. Replies
    8
    Views
    2

    Re: Simple Code not working properly

    I wrote above the image what I am getting.
    That is all I am getting:

    The student average is: 0.01
    The student GPA is: 4.0E-4
    When I just enter one test and 100 as the grade
  3. Replies
    8
    Views
    2

    Re: Simple Code not working properly

    The student average is: 0.01
    The student GPA is: 4.0E-4
    When I just enter one test and 100 as the grade
  4. Replies
    8
    Views
    2

    Simple Code not working properly

    This is my class:



    /**
    * The StudentReport1 class has fields for name, grade, school, of a student
    *
    * @author Luis Fierro
    * @version 4/05/2014
    */
  5. Replies
    23
    Views
    5

    Re: Syntax error!!!

    Sorry is just that I wanna finish this fast to start with more homework and I don't even get focused on what I'm doing.
    Ok... at the end of the code I was thinking on writing something like ...
  6. Replies
    23
    Views
    5

    Re: Syntax error!!!

    number of classes
    So it should look like
    System.out.println(total=+grades);
    Then
    System.out.println("Enter number of grades: ")
  7. Replies
    23
    Views
    5

    Re: Syntax error!!!

    calculate and print average, and gpa

    --- Update ---

    Is there anyway that you can put me a example step by step because I have 1hr to turn in the code and I don't know how to fix that
  8. Replies
    23
    Views
    5

    Re: Syntax error!!!

    Could I see an example because I don't get it, like, what should I change or where should I add something
  9. Replies
    23
    Views
    5

    Re: Syntax error!!!

    I fixed it and now I'm not getting any error but it is not working as it should be.
    I'm usign BJ and when starting the demo it jumps to the part "Enter the number of grades:"
    Then after choosing a...
  10. Replies
    23
    Views
    5

    Re: Syntax error!!!

    I have this until now but how can I do in order to name a method inside the main method like
    I have public static void main(String[]args)
    {
    public main StudentReport1 getData()
    {...
  11. Replies
    23
    Views
    5

    Re: Syntax error!!!

    I changed my code and declared
    StudentReport1 method = new StudentReport1();

    but is says "constructor StudentReport1 in class StudentReport1 cannot be applied
    to given types; required:...
  12. Replies
    23
    Views
    5

    Re: Syntax error!!!

    there's something
    possible loss of precision
    required: int; founr: double

    total=getTotal(grades);
  13. Replies
    23
    Views
    5

    Re: Syntax error!!!

    It doesn't really say error it just crash when running and Idk what I suppose to fix, idk if you could look the code of the demo. Thats where the error should be

    --- Update ---




    /**
    *...
  14. Replies
    23
    Views
    5

    Re: Syntax error!!!

    I change the variable to :
    private int numOfClasses;
    but it says illegal start of expression

    --- Update ---

    haha sorry thats was a dumb question it was because I declared the variables inside...
  15. Replies
    23
    Views
    5

    Re: Syntax error!!!

    I haven't change the double numOfClasses sorry, but the main problem is that it says error and I don't know what is wrong in my code
    I Think there must be something wrong with the getNumOfClasses...
  16. Re: I am not sure what else do I need to complete it

    I wasn't completely focused in the code thanks, I saw what I had wrong
  17. Replies
    23
    Views
    5

    Syntax error!!!

    I'm finishing this demo using get(whatever) in order to test a class



    /**
    * The ReportGenerator class uses the StudentReport1 class to simulate the report
    * of a student. Holds fields for...
  18. Uncomplete code to test another program

    I wrote this code first as a class to get information of a student and calculate average



    /**
    * This program shows a database of students in a school.
    * It gathers information as name,...
  19. Re: I am not sure what else do I need to complete it

    I'm supposed to write a code where the class has static methods: to accept radius and calculate area, accept length and with to calculate a rectangle's area, and accept base and height for a...
  20. I am not sure what else do I need to complete it

    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;

    /**
    * The Geometry DEMO
    *
    * @author Luis Fierro
    * @version 4/1/2014
    */
  21. Replies
    9
    Views
    160

    Re: GPA and average program

    thanks guys I made the proper changes and it is now working, I will still add some other things.
    Again thanks
  22. Replies
    9
    Views
    160

    Average code not working

    I fixed some parts of my code but now it gives me an error at end saying:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 4
    at StudentReport.main(StudentReport.java:52)
    ...
  23. Replies
    9
    Views
    160

    Re: GPA and average program

    haha yeah you are right I didn't see that. I changed that but how I make sure that it stops when telling it to add less of 6 grades. Like if the student says 3 and once he adds the third grade, the...
  24. Replies
    9
    Views
    160

    Re: GPA and average program

    I know what I have wrong but I don't know how to fix it. The incorrect part is when using grades and average, because at the end, I get average=o. to due to having declared grades=0 but I don't know...
  25. Replies
    9
    Views
    160

    GPA and average program

    I am new on this and I will be working in a gpa and average program.
    This is my code so far:
    Everytime that I try to add the gpa part it gives me errors or just duplicates whatever I've in average...
Results 1 to 25 of 25