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...
Type: Posts; User: Gerock7
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...
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
The student average is: 0.01
The student GPA is: 4.0E-4
When I just enter one test and 100 as the grade
This is my class:
/**
* The StudentReport1 class has fields for name, grade, school, of a student
*
* @author Luis Fierro
* @version 4/05/2014
*/
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 ...
number of classes
So it should look like
System.out.println(total=+grades);
Then
System.out.println("Enter number of grades: ")
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
Could I see an example because I don't get it, like, what should I change or where should I add something
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...
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()
{...
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:...
there's something
possible loss of precision
required: int; founr: double
total=getTotal(grades);
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 ---
/**
*...
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...
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...
I wasn't completely focused in the code thanks, I saw what I had wrong
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...
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,...
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...
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
/**
* The Geometry DEMO
*
* @author Luis Fierro
* @version 4/1/2014
*/
thanks guys I made the proper changes and it is now working, I will still add some other things.
Again thanks
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)
...
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...
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...
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...